## Objects

## Main.Objects History

Hide minor edits - Show changes to output

Changed line 151 from:

* Thermo_* - Thermodynamic properties (* see ~~below~~ for specific properties)

to:

* Thermo_* - Thermodynamic properties (* see [[Main/Compounds|Thermo information]] for specific properties)

Deleted lines 154-318:

!!! Thermo objects

Thermo objects access data from the underlying thermodynamic database. There are many compounds accessible in the database. To reduce the size of the APMonitor executable, only some of the more common compounds are currently incorporated. Additional compounds can be easily added but require a rebuild of the executable.

!!!! Temperature Independent Property Data

Temperature independent property data do not vary with temperature. They are defined as constants for each of the species declared in the Compounds ... End Compounds section of the model. If the Compounds ... End Compounds section is missing, all available compounds are included in the model.

(:table border=1 width=100%:)

(:cellnr:) thermo_mw

(:cell:) Molecular Weight

(:cell:) kg/kmol

(:cellnr:) thermo_tc

(:cell:) Critical Temperature

(:cell:) K

(:cellnr:) thermo_pc

(:cell:) Critical Pressure

(:cell:) Pa

(:cellnr:) thermo_vc

(:cell:) Critical Volume

(:cell:) m^3/kmol

(:cellnr:) thermo_ccf

(:cell:) Crit Compress Factor

(:cell:) unitless

(:cellnr:) thermo_mp

(:cell:) Melting Point

(:cell:) K

(:cellnr:) thermo_tpt

(:cell:) Triple Pt Temperature

(:cell:) K

(:cellnr:) thermo_tpp

(:cell:) Triple Pt Pressure

(:cell:) Pa

(:cellnr:) thermo_nbp

(:cell:) Normal Boiling Point

(:cell:) K

(:cellnr:) thermo_lmv

(:cell:) Liq Molar Volume

(:cell:) m^3/kmol

(:cellnr:) thermo_ighf

(:cell:) IG Heat of Formation

(:cell:) J/kmol

(:cellnr:) thermo_iggf

(:cell:) IG Gibbs of Formation

(:cell:) J/kmol

(:cellnr:) thermo_igae

(:cell:) IG Absolute Entropy

(:cell:) J/kmol*K

(:cellnr:) thermo_shf

(:cell:) Std Heat of Formation

(:cell:) J/kmol

(:cellnr:) thermo_sgf

(:cell:) Std Gibbs of Formation

(:cell:) J/kmol

(:cellnr:) thermo_sae

(:cell:) Std Absolute Entropy

(:cell:) J/kmol*K

(:cellnr:) thermo_hfmp

(:cell:) Heat Fusion at Melt Pt

(:cell:) J/kmol

(:cellnr:) thermo_snhc

(:cell:) Std Net Heat of Comb

(:cell:) J/kmol

(:cellnr:) thermo_af

(:cell:) Acentric Factor

(:cell:) unitless

(:cellnr:) thermo_rg

(:cell:) Radius of Gyration

(:cell:) m

(:cellnr:) thermo_sp

(:cell:) Solubility Parameter

(:cell:) (J/m^3)^0.5

(:cellnr:) thermo_dm

(:cell:) Dipole Moment

(:cell:) c*m

(:cellnr:) thermo_r

(:cell:) van der Waals Volume

(:cell:) m^3/kmol

(:cellnr:) thermo_q

(:cell:) van der Waals Area

(:cell:) m^2

(:cellnr:) thermo_ri

(:cell:) Refractive Index

(:cell:) unitless

(:cellnr:) thermo_fp

(:cell:) Flash Point

(:cell:) K

(:cellnr:) thermo_lfl

(:cell:) Lower Flammability Limit

(:cell:) K

(:cellnr:) thermo_ufl

(:cell:) Upper Flammability Limit

(:cell:) K

(:cellnr:) thermo_lflt

(:cell:) Lower Flamm Limit Temp

(:cell:) K

(:cellnr:) thermo_uflt

(:cell:) Upper Flamm Limit Temp

(:cell:) K

(:cellnr:) thermo_ait

(:cell:) Auto Ignition Temp

(:cell:) K

(:tableend:)

!!!! Temperature Dependent Property Data

The temperature dependent thermo objects produce values based on a specified temperature. When a temperature dependent property object is declared, a new temperature variable will be created. This variable can be adjusted or linked to an existing temperature of interest.

(:table border=1 width=100%:)

(:cellnr:) thermo_sd

(:cell:) Solid Density

(:cell:) kmol/m^3

(:cellnr:) thermo_ld

(:cell:) Liquid Density

(:cell:) kmol/m^3

(:cellnr:) thermo_svp

(:cell:) Solid Vapor Pressure

(:cell:) Pa

(:cellnr:) thermo_lvp

(:cell:) Liquid Vapor Pressure

(:cell:) Pa

(:cellnr:) thermo_hvap

(:cell:) Heat of Vaporization

(:cell:) J/kmol

(:cellnr:) thermo_scp

(:cell:) Solid Heat Capacity

(:cell:) J/kmol*K

(:cellnr:) thermo_lcp

(:cell:) Liquid Heat Capacity

(:cell:) J/kmol*K

(:cellnr:) thermo_igcp

(:cell:) Ideal Gas Heat Capacity

(:cell:) J/kmol*K

(:cellnr:) thermo_svc

(:cell:) Second Virial Coefficient

(:cell:) m^3/kmol

(:cellnr:) thermo_lv

(:cell:) Liquid Viscosity

(:cell:) Pa*s

(:cellnr:) thermo_vv

(:cell:) Vapor Viscosity

(:cell:) Pa*s

(:cellnr:) thermo_sk

(:cell:) Solid Thermal Conductivity

(:cell:) W/m*K

(:cellnr:) thermo_lk

(:cell:) Liq Thermal Conductivity

(:cell:) W/m*K

(:cellnr:) thermo_vk

(:cell:) Vap Thermal Conductivity

(:cell:) W/m*K

(:cellnr:) thermo_st

(:cell:) Surface Tension

(:cell:) N/m

(:cellnr:) thermo_sh

(:cell:) Solid Enthalpy

(:cell:) J/kmol

(:cellnr:) thermo_lh

(:cell:) Liq Enthalpy

(:cell:) J/kmol

(:cellnr:) thermo_vh

(:cell:) Vap Enthalpy

(:cell:) J/kmol

(:tableend:)

Changed line 5 from:

[[https://gekko.readthedocs.io/en/latest/|Python GEKKO]] has [[https://gekko.readthedocs.io/en/latest/model_methods.html?highlight=objects#equation-functions|equation functions]] and [[https://gekko.readthedocs.io/en/latest/model_methods.html?highlight=objects#pre-built-objects|pre-built objects]]. ~~Some of the~~ pre-built objects and equation functions are:

to:

[[https://gekko.readthedocs.io/en/latest/|Python GEKKO]] has [[https://gekko.readthedocs.io/en/latest/model_methods.html?highlight=objects#equation-functions|equation functions]] and [[https://gekko.readthedocs.io/en/latest/model_methods.html?highlight=objects#pre-built-objects|pre-built objects]]. GEKKO has objects in the [[https://gekko.readthedocs.io/en/latest/brain.html|Deep Learning (Brain)]] and [[https://gekko.readthedocs.io/en/latest/chemical.html|Thermo & Flowsheet Chemical]] libraries. Some of the other pre-built objects and equation functions are:

Added line 24:

* '''if3(cond,x1,x2)''' switch between x1 (cond<0) and x2 (cond>=0)

Changed line 157 from:

Thermo objects access data from the underlying thermodynamic database. There are ~~over 1700~~ compounds accessible in the database. To reduce the size of the APMonitor executable, only some of the more common compounds are currently incorporated. Additional compounds can be easily added but require a rebuild of the executable.

to:

Thermo objects access data from the underlying thermodynamic database. There are many compounds accessible in the database. To reduce the size of the APMonitor executable, only some of the more common compounds are currently incorporated. Additional compounds can be easily added but require a rebuild of the executable.

Added line 31:

* '''pwl''' piece-wise linear function

Added line 41:

* '''vsum(x)''' vertical sum of a single variable in the data direction

Added line 12:

* '''Array(type,size)''' array of GEKKO objects

Added lines 41-42:

In [[https://gekko.readthedocs.io/en/latest/overview.html|Python GEKKO]], objects are defined as components of the model as ''m.object_name()''.

Deleted lines 44-45:

Added lines 58-81:

(:sourceend:)

'''Python GEKKO Example Usage (Array, abs3, sum)'''

(:source lang=python:)

from gekko import GEKKO

import numpy as np

m = GEKKO()

x1 = m.Param(-2)

x2 = m.Param(-1)

x3 = np.linspace(0,1,6)

x4 = m.Array(m.Param,3)

y4 = m.Array(m.Var,3)

for i in range(3):

x4[i].value=-0.2

y4[i] = m.abs3(x4[i])

# create variable

y = m.Var()

# y = 0.6 = -2 -1 + 3 + 0.6

m.Equation(y == sum([x1,x2]) + sum(x3) + sum(y4))

m.solve() # solve

print('x1: ' + str(x1.value))

print('x2: ' + str(x2.value))

print('y: ' + str(y.value))

'''Python GEKKO Example Usage (Array, abs3, sum)'''

(:source lang=python:)

from gekko import GEKKO

import numpy as np

m = GEKKO()

x1 = m.Param(-2)

x2 = m.Param(-1)

x3 = np.linspace(0,1,6)

x4 = m.Array(m.Param,3)

y4 = m.Array(m.Var,3)

for i in range(3):

x4[i].value=-0.2

y4[i] = m.abs3(x4[i])

# create variable

y = m.Var()

# y = 0.6 = -2 -1 + 3 + 0.6

m.Equation(y == sum([x1,x2]) + sum(x3) + sum(y4))

m.solve() # solve

print('x1: ' + str(x1.value))

print('x2: ' + str(x2.value))

print('y: ' + str(y.value))

Added line 36:

* '''sum''' summation of elements in a list or numpy array

Changed line 8 from:

* '''abs2(x)''' absolute value with ~~MPCC (continuous first/second deriv)~~

to:

* '''abs2(x)''' absolute value with MPCC

Added lines 25-28:

* '''max2(x1,x2)''' maximum value with MPCC

* '''max3(x1,x2)''' maximum value with binary variable for switch

* '''min2(x1,x2)''' minimum value with MPCC

* '''min3(x1,x2)''' minimum value with binary variable for switch

* '''max3(x1,x2)''' maximum value with binary variable for switch

* '''min2(x1,x2)''' minimum value with MPCC

* '''min3(x1,x2)''' minimum value with binary variable for switch

Changed line 30 from:

* '''sign2(x)''' signum operator with ~~MPCC (continuous first/second deriv)~~

to:

* '''sign2(x)''' signum operator with MPCC

Added lines 26-27:

* '''sign2(x)''' signum operator with MPCC (continuous first/second deriv)

* '''sign3(x)''' signum operator with binary variable for switch

* '''sign3(x)''' signum operator with binary variable for switch

Changed line 5 from:

to:

[[https://gekko.readthedocs.io/en/latest/|Python GEKKO]] has [[https://gekko.readthedocs.io/en/latest/model_methods.html?highlight=objects#equation-functions|equation functions]] and [[https://gekko.readthedocs.io/en/latest/model_methods.html?highlight=objects#pre-built-objects|pre-built objects]]. Some of the pre-built objects and equation functions are:

Added line 58:

(:source lang=python:)

Added line 76:

(:sourceend:)

Changed lines 300-301 from:

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

(:cellnr:)

(:cellnr

to:

(:source lang=python:)

Changed line 422 from:

(:~~tableend~~:)

to:

(:sourceend:)

Changed line 1 from:

to:

Objects are available in Python GEKKO and the %blue%A%red%P%black%Monitor language to simplify the description of complex models.

Changed lines 7-33 from:

* abs(x) absolute value |x|

* abs2(x) absolute value with MPCC (continuous first/second deriv)

* abs3(x) absolute value with binary variable for switch

* acos(x) inverse cosine, cos^-1(x)

* acosh(x) inverse hyperbolic cosine, cosh^-1(x)

* arx auto-regressive exogenous input (time series) model

* asin(x) inverse sine, sin^-1(x)

* asinh(x) inverse hyperbolic sine, sinh^-1(x)

* atan(x) inverse tangent, tan^-1(x)

* atanh(x) inverse hyperbolic tangent, tanh^-1(x)

* bspline bspline for 2D data

* cos(x) cosine

* cspline cubic spline for 1D data

* erf(x) error function

* erfc(x) complementary error function

* exp(x) e^x

* log(x) log_e (x), natural log

* log10(x) log_10 (x), log base 10

* periodic periodic (initial=final) for dynamic problems

* sin(x) sine

* sinh(x) hyperbolic sine

* sqrt(x) square root

* state_space continuous/discrete and dense/sparse state space

* tan(x) tangent

* tanh(x)~~ hyperbolic tangent~~

'''~~Python GEKKO Example~~ (abs3)'''

* abs2(x) absolute value with MPCC (continuous first/second deriv)

* abs3(x) absolute value with binary variable for switch

* acos(x) inverse cosine, cos^-1(x)

* acosh(x) inverse hyperbolic cosine, cosh^-1(x)

* arx auto-regressive exogenous input (time series) model

* asin(x) inverse sine, sin^-1(x)

* asinh(x) inverse hyperbolic sine, sinh^-1(x)

* atan(x) inverse tangent, tan^-1(x)

* atanh(x) inverse hyperbolic tangent, tanh^-1(x)

* bspline bspline for 2D data

* cos(x) cosine

* cspline cubic spline for 1D data

* erf(x) error function

* erfc(x) complementary error function

* exp(x) e^x

* log(x) log_e (x), natural log

* log10(x) log_10 (x), log base 10

* periodic periodic (initial=final) for dynamic problems

* sin(x) sine

* sinh(x) hyperbolic sine

* sqrt(x) square root

* state_space continuous/discrete and dense/sparse state space

* tan(x) tangent

* tanh(x)

to:

* '''abs(x)''' absolute value |x|

* '''abs2(x)''' absolute value with MPCC (continuous first/second deriv)

* '''abs3(x)''' absolute value with binary variable for switch

* '''acos(x)''' inverse cosine, cos^-1(x)

* '''acosh(x)''' inverse hyperbolic cosine, cosh^-1(x)

* '''arx''' auto-regressive exogenous input (time series) model

* '''asin(x)''' inverse sine, sin^-1(x)

* '''asinh(x)''' inverse hyperbolic sine, sinh^-1(x)

* '''atan(x)''' inverse tangent, tan^-1(x)

* '''atanh(x)''' inverse hyperbolic tangent, tanh^-1(x)

* '''bspline''' bspline for 2D data

* '''cos(x)''' cosine

* '''cspline''' cubic spline for 1D data

* '''erf(x)''' error function

* '''erfc(x)''' complementary error function

* '''exp(x)''' e^x

* '''log(x)''' log_e (x), natural log

* '''log10(x)''' log_10 (x), log base 10

* '''periodic''' periodic (initial=final) for dynamic problems

* '''sin(x)''' sine

* '''sinh(x)''' hyperbolic sine

* '''sqrt(x)''' square root

* '''state_space''' continuous/discrete and dense/sparse state space

* '''tan(x)''' tangent

* '''tanh(x)''' hyperbolic tangent

'''Python GEKKO Example Usage (abs3)'''

* '''abs2(x)''' absolute value with MPCC (continuous first/second deriv)

* '''abs3(x)''' absolute value with binary variable for switch

* '''acos(x)''' inverse cosine, cos^-1(x)

* '''acosh(x)''' inverse hyperbolic cosine, cosh^-1(x)

* '''arx''' auto-regressive exogenous input (time series) model

* '''asin(x)''' inverse sine, sin^-1(x)

* '''asinh(x)''' inverse hyperbolic sine, sinh^-1(x)

* '''atan(x)''' inverse tangent, tan^-1(x)

* '''atanh(x)''' inverse hyperbolic tangent, tanh^-1(x)

* '''bspline''' bspline for 2D data

* '''cos(x)''' cosine

* '''cspline''' cubic spline for 1D data

* '''erf(x)''' error function

* '''erfc(x)''' complementary error function

* '''exp(x)''' e^x

* '''log(x)''' log_e (x), natural log

* '''log10(x)''' log_10 (x), log base 10

* '''periodic''' periodic (initial=final) for dynamic problems

* '''sin(x)''' sine

* '''sinh(x)''' hyperbolic sine

* '''sqrt(x)''' square root

* '''state_space''' continuous/discrete and dense/sparse state space

* '''tan(x)''' tangent

* '''tanh(x)''' hyperbolic tangent

'''Python GEKKO Example Usage (abs3)'''

Changed lines 3-4 from:

to:

!!! Python GEKKO Object Library

In [[https://gekko.readthedocs.io/en/latest/model_methods.html?highlight=objects#pre-built-objects|Python GEKKO]], some of the objects and functions are:

* abs(x) absolute value |x|

* abs2(x) absolute value with MPCC (continuous first/second deriv)

* abs3(x) absolute value with binary variable for switch

* acos(x) inverse cosine, cos^-1(x)

* acosh(x) inverse hyperbolic cosine, cosh^-1(x)

* arx auto-regressive exogenous input (time series) model

* asin(x) inverse sine, sin^-1(x)

* asinh(x) inverse hyperbolic sine, sinh^-1(x)

* atan(x) inverse tangent, tan^-1(x)

* atanh(x) inverse hyperbolic tangent, tanh^-1(x)

* bspline bspline for 2D data

* cos(x) cosine

* cspline cubic spline for 1D data

* erf(x) error function

* erfc(x) complementary error function

* exp(x) e^x

* log(x) log_e (x), natural log

* log10(x) log_10 (x), log base 10

* periodic periodic (initial=final) for dynamic problems

* sin(x) sine

* sinh(x) hyperbolic sine

* sqrt(x) square root

* state_space continuous/discrete and dense/sparse state space

* tan(x) tangent

* tanh(x) hyperbolic tangent

'''Python GEKKO Example (abs3)'''

In [[https://gekko.readthedocs.io/en/latest/overview.html|Python GEKKO]], objects are defined as components of the model such as ''m.abs3()''.

In [[https://gekko.readthedocs.io/en/latest/model_methods.html?highlight=objects#pre-built-objects|Python GEKKO]], some of the objects and functions are:

* abs(x) absolute value |x|

* abs2(x) absolute value with MPCC (continuous first/second deriv)

* abs3(x) absolute value with binary variable for switch

* acos(x) inverse cosine, cos^-1(x)

* acosh(x) inverse hyperbolic cosine, cosh^-1(x)

* arx auto-regressive exogenous input (time series) model

* asin(x) inverse sine, sin^-1(x)

* asinh(x) inverse hyperbolic sine, sinh^-1(x)

* atan(x) inverse tangent, tan^-1(x)

* atanh(x) inverse hyperbolic tangent, tanh^-1(x)

* bspline bspline for 2D data

* cos(x) cosine

* cspline cubic spline for 1D data

* erf(x) error function

* erfc(x) complementary error function

* exp(x) e^x

* log(x) log_e (x), natural log

* log10(x) log_10 (x), log base 10

* periodic periodic (initial=final) for dynamic problems

* sin(x) sine

* sinh(x) hyperbolic sine

* sqrt(x) square root

* state_space continuous/discrete and dense/sparse state space

* tan(x) tangent

* tanh(x) hyperbolic tangent

'''Python GEKKO Example (abs3)'''

In [[https://gekko.readthedocs.io/en/latest/overview.html|Python GEKKO]], objects are defined as components of the model such as ''m.abs3()''.

Added lines 52-53:

!!! APMonitor Object Library

Deleted lines 75-106:

In [[https://gekko.readthedocs.io/en/latest/model_methods.html?highlight=objects#pre-built-objects|Python GEKKO]], some of the objects and functions are:

* abs(x) absolute value |x|

* abs2(x) absolute value with MPCC (continuous first/second deriv)

* abs3(x) absolute value with binary variable for switch

* acos(x) inverse cosine, cos^-1(x)

* acosh(x) inverse hyperbolic cosine, cosh^-1(x)

* arx auto-regressive exogenous input (time series) model

* asin(x) inverse sine, sin^-1(x)

* asinh(x) inverse hyperbolic sine, sinh^-1(x)

* atan(x) inverse tangent, tan^-1(x)

* atanh(x) inverse hyperbolic tangent, tanh^-1(x)

* bspline bspline for 2D data

* cos(x) cosine

* cspline cubic spline for 1D data

* erf(x) error function

* erfc(x) complementary error function

* exp(x) e^x

* log(x) log_e (x), natural log

* log10(x) log_10 (x), log base 10

* periodic periodic (initial=final) for dynamic problems

* sin(x) sine

* sinh(x) hyperbolic sine

* sqrt(x) square root

* state_space continuous/discrete and dense/sparse state space

* tan(x) tangent

* tanh(x) hyperbolic tangent

!!! APMonitor Object Library

Deleted line 117:

Changed lines 3-12 from:

In [[https://gekko.readthedocs.io/en/latest/~~model_methods~~.html~~?highlight=objects#pre-built-objects~~|Python GEKKO]], ~~some of the objects are:~~

* abs2 = absolute value with MPCC (continuous first/second deriv)

* abs3= ~~absolute value with binary variable for switch~~

* arx= ~~auto-regressive exogenous input ~~(~~time series~~) ~~model~~

* bspline = bspline for 2D data

* cspline = cubic spline for 1D data

* periodic = periodic(~~initial=final~~)~~ for dynamic problems~~

* state_space = continuous/discrete and dense/sparse state space

* abs2 = absolute value with MPCC (continuous first/second deriv)

* abs3

* arx

* bspline = bspline for 2D data

* cspline = cubic spline for 1D data

* periodic = periodic

* state_space = continuous/discrete and dense/sparse state space

to:

In [[https://gekko.readthedocs.io/en/latest/overview.html|Python GEKKO]], objects are defined as components of the model.

(:source lang=python:)

from gekko import GEKKO

# define new GEKKO model

m = GEKKO()

# variable

x = m.Var(-0.5)

# calculate y=abs(x) with abs3

y = m.abs3(x)

# solve with APOPT (MINLP solver)

m.solve()

# print solution

print('x: ' + str(x.value))

print('y: ' + str(y.value))

(:sourceend:)

(:source lang=python:)

from gekko import GEKKO

# define new GEKKO model

m = GEKKO()

# variable

x = m.Var(-0.5)

# calculate y=abs(x) with abs3

y = m.abs3(x)

# solve with APOPT (MINLP solver)

m.solve()

# print solution

print('x: ' + str(x.value))

print('y: ' + str(y.value))

(:sourceend:)

Changed lines 42-72 from:

to:

!!! Python GEKKO Object Library

In [[https://gekko.readthedocs.io/en/latest/model_methods.html?highlight=objects#pre-built-objects|Python GEKKO]], some of the objects and functions are:

* abs(x) absolute value |x|

* abs2(x) absolute value with MPCC (continuous first/second deriv)

* abs3(x) absolute value with binary variable for switch

* acos(x) inverse cosine, cos^-1(x)

* acosh(x) inverse hyperbolic cosine, cosh^-1(x)

* arx auto-regressive exogenous input (time series) model

* asin(x) inverse sine, sin^-1(x)

* asinh(x) inverse hyperbolic sine, sinh^-1(x)

* atan(x) inverse tangent, tan^-1(x)

* atanh(x) inverse hyperbolic tangent, tanh^-1(x)

* bspline bspline for 2D data

* cos(x) cosine

* cspline cubic spline for 1D data

* erf(x) error function

* erfc(x) complementary error function

* exp(x) e^x

* log(x) log_e (x), natural log

* log10(x) log_10 (x), log base 10

* periodic periodic (initial=final) for dynamic problems

* sin(x) sine

* sinh(x) hyperbolic sine

* sqrt(x) square root

* state_space continuous/discrete and dense/sparse state space

* tan(x) tangent

* tanh(x) hyperbolic tangent

!!! APMonitor Object Library

In [[https://gekko.readthedocs.io/en/latest/model_methods.html?highlight=objects#pre-built-objects|Python GEKKO]], some of the objects and functions are:

* abs(x) absolute value |x|

* abs2(x) absolute value with MPCC (continuous first/second deriv)

* abs3(x) absolute value with binary variable for switch

* acos(x) inverse cosine, cos^-1(x)

* acosh(x) inverse hyperbolic cosine, cosh^-1(x)

* arx auto-regressive exogenous input (time series) model

* asin(x) inverse sine, sin^-1(x)

* asinh(x) inverse hyperbolic sine, sinh^-1(x)

* atan(x) inverse tangent, tan^-1(x)

* atanh(x) inverse hyperbolic tangent, tanh^-1(x)

* bspline bspline for 2D data

* cos(x) cosine

* cspline cubic spline for 1D data

* erf(x) error function

* erfc(x) complementary error function

* exp(x) e^x

* log(x) log_e (x), natural log

* log10(x) log_10 (x), log base 10

* periodic periodic (initial=final) for dynamic problems

* sin(x) sine

* sinh(x) hyperbolic sine

* sqrt(x) square root

* state_space continuous/discrete and dense/sparse state space

* tan(x) tangent

* tanh(x) hyperbolic tangent

!!! APMonitor Object Library

Changed line 39 from:

* [[Apps/MpecExamples|Abs - Absolute value~~ (MPEC)~~]]

to:

* [[Apps/MpecExamples|Abs - Absolute value]]

Changed lines 1-13 from:

to:

Some pre-built objects are available in the %blue%A%red%P%black%Monitor language to facilitate flowsheets of processing equipment while others are to simplify model building.

In [[https://gekko.readthedocs.io/en/latest/model_methods.html?highlight=objects#pre-built-objects|Python GEKKO]], some of the objects are:

* abs2 = absolute value with MPCC (continuous first/second deriv)

* abs3 = absolute value with binary variable for switch

* arx = auto-regressive exogenous input (time series) model

* bspline = bspline for 2D data

* cspline = cubic spline for 1D data

* periodic = periodic (initial=final) for dynamic problems

* state_space = continuous/discrete and dense/sparse state space

In APMonitor, objects are defined in the ''Objects ... End Objects'' section of the model file. New instances of an object are defined by declaring a new object name equal to the parent object type.

In [[https://gekko.readthedocs.io/en/latest/model_methods.html?highlight=objects#pre-built-objects|Python GEKKO]], some of the objects are:

* abs2 = absolute value with MPCC (continuous first/second deriv)

* abs3 = absolute value with binary variable for switch

* arx = auto-regressive exogenous input (time series) model

* bspline = bspline for 2D data

* cspline = cubic spline for 1D data

* periodic = periodic (initial=final) for dynamic problems

* state_space = continuous/discrete and dense/sparse state space

In APMonitor, objects are defined in the ''Objects ... End Objects'' section of the model file. New instances of an object are defined by declaring a new object name equal to the parent object type.

Changed line 28 from:

* ARX, Linear Time Invariant ~~Model~~

to:

* [[Apps/ARXTimeSeries|ARX, Linear Time Invariant Model]]

Added line 66:

* VSum - Summation of a single variable in data dimension

Changed lines 28-29 from:

* [[Main/~~ObjectCspline~~|~~Cubic~~ spline]]

to:

* [[Main/ObjectBspline|Basis spline (b-spline)]]

* [[Main/ObjectCspline|Cubic spline (c-spline)]]

* [[Main/ObjectCspline|Cubic spline (c-spline)]]

Added line 5:

! example use of ABS as MPEC

Changed line 7 from:

to:

a = abs

Added lines 10-22:

Connections

x = a.x

y = a.y

End Connections

Parameters

x = -5

End Parameters

Variables

y

End Variables

x = a.x

y = a.y

End Connections

Parameters

x = -5

End Parameters

Variables

y

End Variables

Added lines 5-8:

Objects

c = abs

End Objects

c = abs

End Objects

Changed lines 11-12 from:

The object library consists of chemical processing equipment such as feed streams, reactors, pumps, mixers, flash columns, vessels, and distillation stages. It also includes other elements that support distributed control system emulation such as a LAG and a PID controller.

to:

The object library consists of common mathematical functions and chemical processing equipment such as feed streams, reactors, pumps, mixers, flash columns, vessels, and distillation stages. It also includes other elements that support distributed control system emulation such as a LAG and a PID controller.

Added line 14:

* [[Main/ObjectCspline|Cubic spline]]

Deleted lines 0-1:

Changed line 55 from:

(:table border=1 width=~~80~~%:)

to:

(:table border=1 width=100%:)

Changed line 155 from:

(:table border=1 width=~~80~~%:)

to:

(:table border=1 width=100%:)

Changed line 228 from:

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

to:

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

Changed line 23 from:

* LTI - Linear time-invariant, discrete or ~~continuous~~

to:

* [[Apps/LinearStateSpace|LTI - Linear time-invariant, discrete or continuous]]

Changed line 34 from:

* PWL - Piece-wise ~~Linear~~

to:

* [[Apps/PiecewiseLinear|PWL - Piece-wise Linear]]

Changed line 11 from:

* Abs - Absolute value (MPEC)

to:

* [[Apps/MpecExamples|Abs - Absolute value (MPEC)]]

Changed lines 27-28 from:

* Max - Maximum value (MPEC)

* Min - Minimum value (MPEC)

to:

* [[Apps/MpecExamples|Max - Maximum value (MPEC)]]

* [[Apps/MpecExamples|Min - Minimum value (MPEC)]]

* [[Apps/MpecExamples|Min - Minimum value (MPEC)]]

Changed line 30 from:

* Periodic - Periodic boundary ~~condition~~

to:

* [[Apps/PeriodicBoundaryConditions|Periodic - Periodic boundary condition]]

Changed line 37 from:

* Sign - Number Sign (-1 or 1)

to:

* [[Apps/MpecExamples|Sign - Number Sign (-1 or 1)]]

Changed line 353 from:

(:tableend:)

to:

(:tableend:)

Added lines 218-223:

----

!! Example - Mixer Application

* %list list-page% [[https://apmonitor.com/online/view_pass.php?f=mixer.apm | Solve Mixer Example Problem]]

Added line 41:

* Sum - Summation of multiple parameters and/or variables

Added line 41:

* Table - Data table that creates parameters or initializes variables

Added lines 200-208:

(:cellnr:) thermo_sh

(:cell:) Solid Enthalpy

(:cell:) J/kmol

(:cellnr:) thermo_lh

(:cell:) Liq Enthalpy

(:cell:) J/kmol

(:cellnr:) thermo_vh

(:cell:) Vap Enthalpy

(:cell:) J/kmol

(:cell:) Solid Enthalpy

(:cell:) J/kmol

(:cellnr:) thermo_lh

(:cell:) Liq Enthalpy

(:cell:) J/kmol

(:cellnr:) thermo_vh

(:cell:) Vap Enthalpy

(:cell:) J/kmol