Main

## Main.Equations History

April 19, 2018, at 03:31 PM by 10.37.1.116 -
Changed line 33 from:
 tanh() Hyperbolic Tanget tanh(x*y)=0
to:
 tanh() Hyperbolic Tangent tanh(x*y)=0

All trigonometric functions are in radians (not degrees).

Changed line 9 from:

The available operands are listed below with a short description of each and a simple example involving variable x and y. 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.

to:

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

Changed line 9 from:

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.

to:

The available operands are listed below with a short description of each and a simple example involving variable x and y. 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.

June 16, 2015, at 06:48 PM by 45.56.3.184 -
Deleted lines 0-1:

## Equations

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:)

December 04, 2008, at 03:02 PM by 158.35.225.227 -
Deleted lines 21-23:
 - Unary minus -(x-y) = 0 - Unary minus -(x-y) = 0 - Unary minus -(x-y) = 0
October 30, 2008, at 03:46 PM by 158.35.225.230 -
October 30, 2008, at 03:17 PM by 158.35.225.230 -
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)

October 30, 2008, at 03:16 PM by 158.35.225.230 -
Changed line 11 from:

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.

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.

October 30, 2008, at 03:14 PM by 158.35.225.230 -
Changed line 15 from:
 ! equation #1 (:html:)
(:htmlend:) 0 = x[1] + x[2] ! comment !,#,% Comment
to:
 !,#,% Comment % equation #1 (:html:)
(:htmlend:) 0 = x[1] + x[2] ! eqn1
October 30, 2008, at 03:13 PM by 158.35.225.230 -
Changed line 15 from:
 !,#,% Comment ! equation #1 (:html:)
(:htmlend:) 0 = x[1] + x[2] ! comment
to:
 ! equation #1 (:html:)
(:htmlend:) 0 = x[1] + x[2] ! comment !,#,% Comment
October 30, 2008, at 03:12 PM by 158.35.225.230 -
Changed line 15 from:
 !,#,% Comment ! comment
to:
 !,#,% Comment ! equation #1 (:html:)
(:htmlend:) 0 = x[1] + x[2] ! comment
October 30, 2008, at 03:11 PM by 158.35.225.230 -
Deleted line 15:
 = Equality x=y
October 30, 2008, at 03:10 PM by 158.35.225.230 -
Changed line 13 from:
to:
Changed lines 15-17 from:
 = Line Continuation 0 = x[1] & (:html:)
(:htmlend:) + x[2]
to:
 !,#,% Comment ! comment = Equality x=y & Line Continuation 0 = x[1] & (:html:)
(:htmlend:) + x[2]
October 30, 2008, at 03:09 PM by 158.35.225.230 -
Changed line 15 from:
 = Line Continuation 0 = x[1] & \n + x[2]
to:
 = Line Continuation 0 = x[1] & (:html:)
(:htmlend:) + x[2]
October 30, 2008, at 03:08 PM by 158.35.225.230 -
Changed line 13 from:
to:
 = Line Continuation 0 = x[1] & \n + x[2]
October 28, 2008, at 09:16 PM by 158.35.225.230 -
 erf() Error function erf(x*y)=0 erfc() Complementary error function erfc(x*y)=0
September 25, 2008, at 07:34 PM by 158.35.225.230 -
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.

 = Equality x=y < Less than x Greater than x>y >= Greater than or equal x>=y
 - 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

  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

September 25, 2008, at 06:21 PM by 158.35.225.230 -
Changed lines 41-62 from:

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

! 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 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

September 25, 2008, at 04:08 PM by 158.35.225.230 -
Changed lines 9-10 from:

to:

### Operations

Changed line 37 from:

to:

### Example

September 25, 2008, at 03:52 PM by 158.35.225.230 -
Changed line 13 from:
to:
September 25, 2008, at 03:52 PM by 158.35.225.230 -
Changed line 13 from:
to:
September 25, 2008, at 03:51 PM by 158.35.225.230 -
Changed line 13 from:
to:
September 25, 2008, at 03:47 PM by 158.35.225.230 -
Changed line 14 from:
Description Operand
to:
OperandDescriptionExample
September 25, 2008, at 03:42 PM by 158.35.225.230 -
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.

September 25, 2008, at 03:40 PM by 158.35.225.230 -

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: # Steady state solution # p = 2 # x = -1.0445 # y = 0.12380 # z = -1.0445 September 25, 2008, at 03:37 PM by 158.35.225.230 - Changed line 47 from: # z = -1.0445E+00 to: # z = -1.0445 September 25, 2008, at 03:37 PM by 158.35.225.230 - 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 September 25, 2008, at 03:32 PM by 158.35.225.230 - 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 APMonitor 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 APMonitor 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 Changed line 45 from:  p = 1  to:  p = 2  Changed lines 54-104 from:  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

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  September 25, 2008, at 03:24 PM by 158.35.225.230 - Added line 35: $ Differential x = -x + y September 25, 2008, at 03:24 PM by 158.35.225.230 - Changed lines 14-34 from: #DescriptionExample 1Unary minus-(x-y) = 0 2Additionx+y = 0 3Subtractionx-y=0 4Multiplicationx*y=0 5Divisionx/y=0 6Powerx^y=0 7Absolute valueabs(x*y)=0 8Exponentiationexp(x*y)=0 9Base-10 Loglog10(x*y)=0 10Natural Loglog(x*y)=0 11Square Rootsqrt(x*y)=0 12Hyperbolic Sinesinh(x*y)=0 13Hyperbolic Cosinecosh(x*y)=0 14Hyperbolic Tangettanh(x*y)=0 15Sinesin(x*y)=0 16Cosinecos(x*y)=0 17Tangenttan(x*y)=0 18Arc-sineasin(x*y)=0 19Arc-cosacos(x*y)=0 20Arc-tangentatan(x*y)=0 to:  Description Example Operand - 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 September 25, 2008, at 03:21 PM by 158.35.225.230 - Changed line 14 from: DescriptionExample to: #DescriptionExample September 25, 2008, at 03:20 PM by 158.35.225.230 - Changed line 13 from: to: 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 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 September 25, 2008, at 03:17 PM by 158.35.225.230 - 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: DescriptionExample September 25, 2008, at 03:16 PM by 158.35.225.230 - Changed lines 14-34 from: DescriptionExample Unary minus-(x-y) = 0 Additionx+y = 0 Subtractionx-y=0 Multiplicationx*y=0 Divisionx/y=0 Powerx^y=0 Absolute valueabs(x*y)=0 Exponentiationexp(x*y)=0 Log10log10(x*y)=0 Log (natural log)log(x*y)=0 Square Rootsqrt(x*y)=0 Hyperbolic Sinesinh(x*y)=0 Hyperbolic Cosinecosh(x*y)=0 Hyperbolic Tangettanh(x*y)=0 Sinesin(x*y)=0 Cosinecos(x*y)=0 Tangenttan(x*y)=0 Arc-sineasin(x*y)=0 Arc-cosacos(x*y)=0 Arc-tangentatan(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 September 25, 2008, at 03:15 PM by 158.35.225.230 - Changed lines 3-4 from: 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). 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 APMonitor 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. DescriptionExample Unary minus-(x-y) = 0 Additionx+y = 0 Subtractionx-y=0 Multiplicationx*y=0 Divisionx/y=0 Powerx^y=0 Absolute valueabs(x*y)=0 Exponentiationexp(x*y)=0 Log10log10(x*y)=0 Log (natural log)log(x*y)=0 Square Rootsqrt(x*y)=0 Hyperbolic Sinesinh(x*y)=0 Hyperbolic Cosinecosh(x*y)=0 Hyperbolic Tangettanh(x*y)=0 Sinesin(x*y)=0 Cosinecos(x*y)=0 Tangenttan(x*y)=0 Arc-sineasin(x*y)=0 Arc-cosacos(x*y)=0 Arc-tangentatan(x*y)=0 Changed lines 42-46 from:  Variables x = 0.2 y = 0.5 z = 1.5 End Variables  to:  Parameters p = 1 End Parameters Variables x y z End Variables  September 25, 2008, at 02:58 PM by 158.35.225.230 - 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':) ! 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:)