0% found this document useful (0 votes)
244 views

Asprova Script

Uploaded by

Anh Vu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
244 views

Asprova Script

Uploaded by

Anh Vu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 109

Asprova

Expression
Handbook

Asprova Corporation
http://www.asprova.com
July 2020 (Ver.16.1)
Contents

Contents

Preface ........................................................................................................ 10

0.Expression possibilities................................................................................ 11

1. Basics ...................................................................................................... 13
Reserved object reference keywords: ME, OTHER, HOLDER, TARGET .............................................................. 15
Other keywords: TRUE, FALSE, INPUT, DELETE ........................................................................................... 15
Conditional If ............................................................................................................................................. 16
Internal function.......................................................................................................................................... 16

String.......................................................................................................................................... 16
Concatenate strings ...................................................................................................................................... 16
New line .................................................................................................................................................... 16
String letter count ........................................................................................................................................ 17
Find sub string inside a string ........................................................................................................................ 17
Search the position of sub string in a string ....................................................................................................... 17
Find number inside a string ........................................................................................................................... 17
Compare two strings .................................................................................................................................... 17
Extract sub string from a string ...................................................................................................................... 17
Number to string, specifying the number of digits .............................................................................................. 18
Insert string ................................................................................................................................................ 18
Convert date and number to string .................................................................................................................. 18

Date ........................................................................................................................................... 18
Add and subtract time from date ..................................................................................................................... 18
Time between two dates................................................................................................................................ 18
Present date ................................................................................................................................................ 18
Return next day, week or month’s start time ...................................................................................................... 18
Return year, month and day from date ............................................................................................................. 19
Convert date to string - Format....................................................................................................................... 19
Convert date to number - ConvertTime ............................................................................................................ 20
Date from number - DateS、DateT、DateF ....................................................................................................... 20
Calculate the time advancing a certain length of time along the working time - AdvanceAlongResourceWorkingTime .... 20

Number ....................................................................................................................................... 20
Round the number of decimal places - Truncate、Roundup、Round ....................................................................... 20
Convert number to string - Format .................................................................................................................. 21
Absolute value - Abs .................................................................................................................................... 21
Square root - Sqrt ........................................................................................................................................ 21
Power function (x to the yth power) - Power ..................................................................................................... 21
Trigonometric functions - Cos、Sin、Tan .......................................................................................................... 21
Exponential function (xth power of e) - Exp ..................................................................................................... 21
Log function – Ln, Log ................................................................................................................................ 21
Normalize functions - NormalizeAscend, NormalizeDescend .............................................................................. 21

Array .......................................................................................................................................... 22
Reference the value ..................................................................................................................................... 22
Set value.................................................................................................................................................... 22

3
Contents

Others ......................................................................................................................................... 22
Verify existence of value - FValid ................................................................................................................... 22
Remove value of the property ........................................................................................................................ 22

2. How to access another object from one specific object ......................................... 23


Order ........................................................................................................................................................ 23
Operation................................................................................................................................................... 24
Task .......................................................................................................................................................... 26
Use instruction ............................................................................................................................................ 26
Input instruction and Output instruction ........................................................................................................... 27
Peg object .................................................................................................................................................. 28
Item .......................................................................................................................................................... 28
Master use instruction .................................................................................................................................. 29
Master input instruction ................................................................................................................................ 29
Master output instruction .............................................................................................................................. 29

3. Display color expression............................................................................... 31


Specify Gantt chart bar color and flag color......................................................................................... 31
By order or item display color ........................................................................................................................ 31
By order priority ......................................................................................................................................... 31
By enum type property ................................................................................................................................. 31
By lateness and earliness violation .................................................................................................................. 32
By color graduation ..................................................................................................................................... 32

Specify use instruction bar text color expression .................................................................................. 32


By lateness and earliness violation .................................................................................................................. 33

Specify order bar text color expression ............................................................................................... 33


By order display color .................................................................................................................................. 33
By order quantity’s number of digits ............................................................................................................... 33
By replenishment order ................................................................................................................................ 33
By order priority ......................................................................................................................................... 33
By lateness and earliness violation .................................................................................................................. 34
By month of the EST, month of the LET .......................................................................................................... 34

Specify operation bar text color expression ......................................................................................... 34


By order priority ......................................................................................................................................... 34
By lateness and earliness .............................................................................................................................. 34

Specify task bar text color expression ................................................................................................ 35


By order priority ......................................................................................................................................... 35
By lateness and earliness violation .................................................................................................................. 35

Specify table cells background and text color ...................................................................................... 35


Pink when the priority is 90 or more, blue when 50 to less than 90, and green when less than 50. ................................ 36

4. String expression ........................................................................................ 37


Specify strings for use instruction bar, data tip, status bar on Gantt chart ................................................... 37
Display order properties ............................................................................................................................... 37
Display operation properties .......................................................................................................................... 37
4
Contents

Display spec specified at order and item .......................................................................................................... 38


Do not display setup string ............................................................................................................................ 38
Display user added properties ........................................................................................................................ 38

Specify string for Gantt chart’s order bar, data tip, status bar ................................................................... 38
Order code ................................................................................................................................................. 38
Order code + Quantity + EST + LET (With descriptive text) ................................................................................ 38
Order code + Item + Quantity + LET .............................................................................................................. 39
Order code+Item code+LET+Priority .............................................................................................................. 39

Specify string for Gantt chart’s operation bar, data tip, status bar ............................................................. 39
Operation code ........................................................................................................................................... 39
Process number (Process code) + Main resource + Start time + End time + Quantity ................................................ 39
Operation code + Item code + Quantity + Order comments .................................................................................. 39
Last dispatching order .................................................................................................................................. 39

Specify string for Gantt chart’s task bar, data tip, status bar..................................................................... 40
Task code................................................................................................................................................... 40
Task code (Net time minutes) ........................................................................................................................ 40
Task code + Start time + End time .................................................................................................................. 40

Customize values shown on Inventory graph ....................................................................................... 40


Format inventory value................................................................................................................................. 40
Monetary value display (dollars) .................................................................................................................... 40

Specify virtual property expression ................................................................................................... 41


Display item’s item name on to order table ....................................................................................................... 41
Display first operation’s status on to order table ................................................................................................ 41

Specify display expression .............................................................................................................. 41


Display order table’s LET as “Year 2007, 06 / 01” ............................................................................................. 41
Display changing the unit of order quantity ...................................................................................................... 41
Format production quantity to 2 digits after decimal point on operation table .......................................................... 42

5. Time expression ......................................................................................... 43


Specify project time periods............................................................................................................. 43
Start of day after project load time .................................................................................................................. 43
Start of day after project load time + 8 hours..................................................................................................... 43
Three days before project basis time ............................................................................................................... 43
365 days after project basis time ..................................................................................................................... 43

Specify inventory valid period.......................................................................................................... 43


Within 3 days after the completed time ............................................................................................................ 43
Specify absolute date ................................................................................................................................... 44
1 week after LET ........................................................................................................................................ 44

6. Conditional expression ................................................................................. 45


Specify Valid condition expression based on order ................................................................................ 45
Order quantity is 100 or greater ...................................................................................................................... 45
Order spec 1 is equal to 'A' and order spec 2 is equal to 'B' .................................................................................. 45
Order EST is a week or more ahead ................................................................................................................ 45

Specify Valid condition expression based on operation .......................................................................... 45


5
Contents

Operation spec 1 is equal to 'A' ...................................................................................................................... 46


Operation quantity is 100 or greater ................................................................................................................ 46
Two operations previous, the operation was assigned to resource A ....................................................................... 46

Specify pegging condition ............................................................................................................... 46


Order spec 1 is equal .................................................................................................................................... 46
Order spec 1 is equal and order spec 2 is equal .................................................................................................. 46

Specify furnace valid condition ........................................................................................................ 46


Operation spec 1 is equal .............................................................................................................................. 46

7.Property assignment expression ..................................................................... 47


Specify the properties to set for operations when exploding orders ........................................................... 47
Copy order comment to operation ................................................................................................................... 47

Specify the properties to set for operations when splitting an operation ..................................................... 47
Copy split root operation comment to split child operation .................................................................................. 47

Copy property from one order to another ............................................................................................ 47


Copy order LET .......................................................................................................................................... 47
Copy order display color ............................................................................................................................... 48
Copy order spec .......................................................................................................................................... 48
Copy order comment.................................................................................................................................... 48

Copy/Set property on Import/Export .................................................................................................. 48


Set order property at specified timing................................................................................................. 48
Set operation property at specified timing ........................................................................................... 49
Confirm operation as released ........................................................................................................................ 49

8.Code generation expression .......................................................................... 50


Customize operation code ............................................................................................................... 50
Order code+Process numbers......................................................................................................................... 50
Order code+Process code .............................................................................................................................. 50

Customize replenishment order code ................................................................................................. 50


M + 6-digit serial number ............................................................................................................................. 50
Unique code ............................................................................................................................................... 50
Manufacturing order/purchase order common serial number ................................................................................ 50
Item code + 6-digit serial number ................................................................................................................... 50
1 to 1 pegging parent order code + Item code .................................................................................................... 51

Customize event order code ............................................................................................................. 51


Event condition from which an event order occurred .......................................................................................... 51

Customize auto-generated intermediate item code expression .................................................................. 51


Item code+Process number............................................................................................................................ 51

Customize the code format for inventory objects generated during theoretical inventory calculation ................ 51
Theoretical Inventory (Item code) ................................................................................................................... 51

9.Filter expression......................................................................................... 52

6
Contents

General purpose filter expressions ..................................................................................................... 52


Filter by Code’s first letter. ............................................................................................................................ 52
Filter by the existence or not of comments........................................................................................................ 52
Filter by the existence or not of children objects ................................................................................................ 52

Order table filter expression ............................................................................................................. 52


Filter by order type ...................................................................................................................................... 52
Filter by order class ..................................................................................................................................... 53
Filter by late due date ................................................................................................................................... 53
Filter by due date ........................................................................................................................................ 53
Filter by completed first process orders ............................................................................................................ 54
Filter by orders started 1 month before but didn’t finish yet ................................................................................. 54

Scheduling parameter settings filter orders .......................................................................................... 54


Filter by order quantity 100 or greater ............................................................................................................. 54
Filter by spec .............................................................................................................................................. 54
Filter by LET and EST ................................................................................................................................. 54

Operation table filter expression ....................................................................................................... 55


Filter by assignment status and resource .......................................................................................................... 55
Filter by Status............................................................................................................................................ 55
Filter by operations with process number 10 ..................................................................................................... 56
Filter by operations with problems .................................................................................................................. 56

Scheduling parameter settings filter operations .................................................................................... 56


Filter by operations assigned to main resource A ............................................................................................... 57
Filter by process .......................................................................................................................................... 57
Filter by assignment time .............................................................................................................................. 57

Integrated master editor table filter expression ..................................................................................... 57


Filter by instruction type ............................................................................................................................... 57
Filter by excluding instructions auto-generated for intermediate items ................................................................... 57
Filter by final items with first letter A .............................................................................................................. 58
Filter by finished item flag. ........................................................................................................................... 58

Resource table filter expression ........................................................................................................ 58


Filter by resource type .................................................................................................................................. 58
Filter by resource group ................................................................................................................................ 58
Filter by furnace resource.............................................................................................................................. 58

Item table filter expression .............................................................................................................. 58


Filter by item type ....................................................................................................................................... 58
Filter by spec and num spec........................................................................................................................... 59
Filter by other than auto-generated intermediate items ........................................................................................ 59

10.Sort expression......................................................................................... 60
Dispatching key on scheduling parameter settings ................................................................................ 60
Sort by order’s property ................................................................................................................................ 60
Sort by operation’s property .......................................................................................................................... 60
Sort by spec ............................................................................................................................................... 60
Sort by sales order due date ........................................................................................................................... 61

11.Integrated master: capacity .......................................................................... 62


7
Contents

Specify resource capacity ................................................................................................................ 62


Specify quantity per unit of time .................................................................................................................... 62
Specify time needed to make one piece ............................................................................................................ 62
Specify fixed time ....................................................................................................................................... 62
Specify complex formulas ............................................................................................................................. 63

Specify In/Out rate in the process ...................................................................................................... 63


Specify fixed In/Out rate ............................................................................................................................... 63

12.Quantity formula ...................................................................................... 64


Standard expression ....................................................................................................................... 64
Rounding floating point numbers ...................................................................................................... 64

13.Scheduling parameter ................................................................................ 66


Weight customization ..................................................................................................................... 66
If LET is not met, assign to backup resource ..................................................................................................... 66
Use resource priority, as long as LET is met ..................................................................................................... 67

Sequence control settings ................................................................................................................ 67


Same item (Evaluation expression sub key: TRUE) ............................................................................................ 67
Change the spec. But if previous operation production time is less than 12 hours, keep the same spec (Evaluation
expression sub key: TRUE) ........................................................................................................................... 67
Spec priority (Evaluation expression sub key: Ascending) ................................................................................... 67
Must follow spec priority sequence (Evaluation expression sub key: TRUE) ........................................................... 68
Minimal setup time (if setup time is within 1 day, set it to 0) (Evaluation expression sub key: Smaller) ........................ 68
Due date period grouping (Evaluation expression sub key: Smaller, Evaluation expression threshold: 3d)..................... 68

14.QA list ................................................................................................... 69


1.Determining if the resource to where the previous operation is assigned is outsource resource. ............................... 69
2.Switching the master data version ............................................................................................................... 69
3.Pegging orders with the same flag settings.................................................................................................... 69
4.Get the operation process code from use instruction ....................................................................................... 70
5.Show the process code of order’s last process ............................................................................................... 70
6.Verify the existence of Process selector ........................................................................................................ 70
7.Verify which process selector the order explosion used ................................................................................... 71
8.Verify if one property exists or not .............................................................................................................. 71
9.Show the result quantity of previous process ................................................................................................. 71
10.Properties after you specify Child ............................................................................................................. 72
11.How to improve resource filling rate specifying resource evaluation’s Additional evaluation expression ................. 72

15.Expression Type Properties by class .............................................................. 73


Project ...................................................................................................................................................... 73
Order ........................................................................................................................................................ 73
Item .......................................................................................................................................................... 73
Master operation ......................................................................................................................................... 73
Master input instruction ................................................................................................................................ 73

8
Contents

Master output instruction .............................................................................................................................. 73


Master use instruction .................................................................................................................................. 73
Resource ................................................................................................................................................... 73
Data I/O .................................................................................................................................................... 73
Resource evaluation ..................................................................................................................................... 74
Modify properties ........................................................................................................................................ 74
Resource Gantt chart .................................................................................................................................... 74
Order Gantt chart ........................................................................................................................................ 74
Inventory graph .......................................................................................................................................... 74
Property definition....................................................................................................................................... 74

16.Internal Function ...................................................................................... 75


String operations ......................................................................................................................................... 75
Cast Date/Time/Number to String ................................................................................................................... 77
Cast String to Number .................................................................................................................................. 77
Cast Date to Integer ..................................................................................................................................... 77
Cast Date toTime ........................................................................................................................................ 78
Cast Time to Time ....................................................................................................................................... 78
Cast Integer to Date ..................................................................................................................................... 79
Cast String to Number .................................................................................................................................. 79
Cast String to Integer ................................................................................................................................... 80
Cast Number to String .................................................................................................................................. 80
Cast Number to Integer ................................................................................................................................ 80
Time Series/Time ........................................................................................................................................ 80
Work time .................................................................................................................................................. 82
Load/Production time/Setup time/Left time and so on ......................................................................................... 85
Property .................................................................................................................................................... 90
Minimum/Maximum/Sum ............................................................................................................................. 92
Spec/SpecNum ........................................................................................................................................... 95
Math functions............................................................................................................................................ 96
Others ....................................................................................................................................................... 98
Internal use .............................................................................................................................................. 102
Internal functions: ABC order list ............................................................................................................... 102

Index .......................................................................................................... 107

9
Introduction
Preface

With advance of production management informatization, production planning informatization is also in demand. There are
different type of manufacturing plants, such as parts maker, electronic, material, chemical, and each one with its own
peculiarities, know-how’s and constraints. Flexibility is needed in the schedulers to attend different demands and Asprova
allows the representation of these know-how’s and constraints using the concept of expression.

“Expression” is akin to programming language, which allows you to represent logical expression, string manipulation, and
conditional expressions in a very generic way. With the use of expression, it becomes possible to implement Asprova in
manufacturing plants where complex constraints and know-how’s exists and was impossible to be implemented in the past.
Furthermore, it is possible to specify GUI settings, DBIO (import/export) filtering and sorting settings in a very customizable
way with the use of expression. There are dozens of places where expression could be specified and understanding how to set
expression is one of key points to implement Asprova.

As expression is akin to programming language, with object oriented concepts, the understanding of Asprova’s object structure
and its grammar and internal functions become a necessary part of the process.

This kind of understanding is not difficult to master if you understand Asprova’s data structure and some best practices.
Therefore, this expression handbook is designed to help the users to understand and to be available whenever you need to
consult about expressions.

Asprova Corporation 2007

10
Asprova expression possibilities

0.Expression possibilities

There are many properties that could be specified on master, order, scheduling parameter, GUI settings, DBIO settings and one
part of then are of expression type. Besides specifying the basic number and string manipulation, it allows to navigate through
the objects and access properties on other objects, call internal functions to execute a complex calculations and therefore,
augmenting the scheduler functionality by ten folds. As such powerful property, the mastering of Asprova could be interpreted
as the mastering of its expressions.

The next few paragraphs you give you a few samples of what is possible to achieve with expressions.

① Customize Gantt chart bar colors →Section 3


Graduated blue coloring (using num spec 1, set from 0-32)
RGB(255*ME.Order.'Num spec 1'/32,255*ME.Order.'Num spec 1'/32,200)

② Customize data tip shown on Gantt chart →Section 4


Customize the data tip to show any specific strings

Specify the expression below for resource Gantt chart use instruction data tip expression.
'Code='+ME.Order+'\n'+'Qty='+ME.Order.'Order quantity'+'\n'+'LET='+Format(ME.Order.LET,'yy/MM/dd')

③ Customize property display expression →Section 4


Display the order LET as [07/06/01]
Format(ME.LET,'yy/MM/dd HH:mm')

11
Asprova expression possiblities
④ Add new use defined property →Section 4
Add new property and specify virtual property expression to show the first process operation’s status on order table
ME.Children[1].Work_Status
ME.Child[1].Work_Status

⑤ Specify scheduling conditions →Section 6


Specify process selector valid condition to define the master to be used depending on order quantity.
Example: Order quantity is 100 or greater
ME.'Order quantity'>=100

⑥ Set specific value to property →Section 7


Specify Order expression on Modify properties command to set EST to the order during the scheduling.
ME.EST =#2007/06/01#

⑦ Filter the objects to be shown in the table →Section 9


Filter objects with first letter ‘A’.
Left(ME,1)==’A’

⑧ Sort the objects shown in the table. →Section 10


Sort operation table by production start time sequence
ME.'Production start time'

⑨ Customize the weight on scheduling parameter settings →Section 13


If LET is not met, assign to backup resource.
IF(ME.'During evaluation - target operation'.'Order '.LET<ME.'During evaluation - production task time series'[0],
If(ME.'Target resources'.'Backup resource flag'=='Yes',10000,0),10000)
If(ME.TentAssignCurrOper.Order.LET<ME.TentAssignProdTimeSeries[1],If(ME.TentAssignCurrRes.BackupFlag=='Yes',10000,0),10000)

12
Basics

1. Basics

Basics of expression are explained here.

String
Strings are delimited by single quotation (‘).
String ‘ABC’ New ‘\n’ Tab ‘\t’
line

Date
Dates read delimited by sharp (#).
Date #2007/6/1 12:00:00#

Time
Time is represented with units.
Second 30s or 30S
Minute 30m 30M
Hour 30h 30H
Day 30d 30D
Week 30w 30W

Capacity
On integrated master editor table, setup, production and teardown capacity are expressed using units.
Production time per unit(second) 30sp or 30SP
Production time per unit(minute) 30mp 30MP
Production time per unit(hour) 30hp 30HP
Production unit per second 30ps 30PS
Production unit per minute 30pm 30PM
Production unit per hour 30ph 30PH

Operators
Equal or not equal operations are done using the operators below.
Equal == Not equal !=

Example:
1 day is 24 hours 1d==24h → TRUE
100 and 50 is not equal 100!=50 → TRUE

Other operators are:


Equal or greater <= And && plus + Assignment =
Equal or less >= Or || minus - Element of array []
Greater < Exp ^ Mult. *
Less > Div. /

The priority of operator is as follows.


1. ^ 4. ==, !=, >, <, >=, <=
2. *, /, % 5. &&, ||
3. +, - 6. =
13
Asprova expression possiblities
Precautions
The character right before unit must be a number. (It is not able to use unit right after parentheses)
When evaluating the expression in which different data types are used such as time span and numbers, the type of returned data
will be the same as the one before operators.

For example, evaluating result will be different in the following table.


Expression Evaluation result Data type Explanation
10m * 2 600s * 2 = 1200s Time span 1200s ( 20m )
2 * 10m 2 * 600s = 1200 Float 1200

Though the returned data of those 2 expressions look the same, they are different in fact. It is because the data types of the
returned data are different.
Time span will be handled as seconds in expressions. Therefore, if evaluated in the way of “Evaluation result” shows, it will be
1200s (20m) when the data type of returned data is time span. If the data type is numbers, it will keep being 1200. And if it was
numbers like 1200 in the “Production” of the Integrated Master Editor table, it will be treated as 1200 minutes.

Please refer to the following table when inputing expressions.


Capacity Expression Wrong expression
5 minutes per piece + 30 minutes 5mp + 30 30 + 5mp
1/30 second per piece 1sp / 30 1 / 30sp

14
Asprova expression possiblities

Reserved object reference keywords: ME, OTHER, HOLDER, TARGET

ME Specific object
Specific objects can be accessed using the keyword ME and its referenced objects changes for each property. In the order table,
ME is order; ME is operation to be assigned in the task selector valid condition property (integrated master editor table).
Therefore, the expression for “operation quantity is 100 or greater” becomes:
ME.'Production quantity'>=100

There are other reserved words to reference objects, besides ME.


OTHER Similar to ME
HOLDER Object holding the property
Keyword OTHER is not used always. Task selector valid condition on integrated master editor table doesn’t use keyword
OTHER (Ver.5.0.0). In such a cases keyword OTHER cannot be used.

Pegging condition property on item class uses keyword OTHER and used as follows.

Example:Orders on both sides have same spec 1


ME.Order.'Spec 1'==OTHER.Order.'Spec 1'

ME is output instruction and OTHER is input instruction for pegging condition property. It evaluates the expression when
pegging these two instructions.

Keyword HOLDER represents the holder of the property. If the property is task selector valid condition, the holder is Master
instruction selector; if pegging condition property, the holder is item object.

TARGET
Keyword TARGET is used within some specific internal functions. The first parameter of internal function takes the object and
TARGET is used in the second parameter on and represents the object specified in the first parameter. Taking the Sum function
as an example, the expression becomes (where TARGET represents order).
Sum('Order',TARGET.'Order quantity')
It will return the sum of order quantity of all orders.

Independent of property, the next two keywords always represent the same object.
PROJECT Project object
WORKSPACE Workspace object

Other keywords: TRUE, FALSE, INPUT, DELETE

TRUE
FALSE
Keyword representing Boolean values of true and false.

INPUT String input from GUI


Keyword INPUT is used for virtual property inverse expression, display expression, display inverse expression, currency
format properties. Basically, it represents the string specified in the cell.

15
Asprova expression possiblities
DELETE
Keyword DELETE is used to remove the value specified in the property. To remove order EST:
ME.Order.EST=DELETE

Keywords are case insensitive

me.'Order quantity'=100 project.’Scheduling basis time

Conditional If

Evaluation of different operations based on condition is possible using the expression below.
Conditional
If(Condition, evaluated if condition is TRUE, evaluated if condition is FALSE)
operator

If start time is earlier than 2007/06/01、insert “ABC” to the first comment, otherwise insert “XYZ”.
ME.'Comments (common)'[1]=IF(ME.'Start time'<=#2007/06/01 00:00:00#,'ABC','XYZ')
ME.Comment[1]=IF(ME.StartTime<=#2007/06/01#,'ABC','XYZ')
Or
IF(ME.'Start time'<=#2007/06/01 00:00:00#,ME.'Comments (common)'[1]='ABC',
ME.'Comments (common)'[1]='XYZ')
IF(ME.StartTime<=#2007/06/01#,ME.Comment[1]='ABC',ME.Comment[1]='XYZ')
※Localized name or internal name could be used as a property name. The first expression uses localized name and the second
expression uses internal name.

Internal function

It is possible to call dozens of internal functions from the expression. Also, it is possible to make new internal function through
COM interfaces (refer to the COM SDK folder for more details).

Get the number of letters


Len(‘ABC’) →3

For details, see the “Internal function” section of this handbook.

String

Strings are delimited by ’(single quotation). The main string manipulation is as follows.

Concatenate strings
’ABC’+’DEF’ → ABCDEF

New line
’ABC’+’\n’ → ’ABC↓’
’ABC\n’ → ’ABC↓’

16
Asprova expression possiblities
String letter count
Len(’ABC’) → 3
Len(’abcde’) → 5

Find sub string inside a string


Find(’ABCDE’, ’BC’) → TRUE
Find(’ABCDE’, ’XY’) → FALSE

Find:
If the sub string is found, returns TRUE, otherwise returns FALSE.

Search the position of sub string in a string


StrStr(’ABCDE’, ’BC’) → 2
StrStr(’ABCDE’, ’XY’) → 0

StrStr:
Returns the position to the first occurrence of a search string in a string.

Find number inside a string


FindNumberL(’Year:2007 Month6 Day1’,1) → 2007
FindNumberR(’Year2007 Month6 Day1’,2) → 6

FindNumberL:
Finds the nth number from the left in the specified string.
FindNumberR:
Finds the nth number from the right in the specified string.

Compare two strings


’ABC’==’ABC’ → TRUE
’ABC’==’A’ → FALSE
’ABC’!=’ABC’ → FALSE
’ABC’!=’A’ → TRUE

Compare by character code.


’ABC’<’XYZ’ → TRUE
’ABC’>’XYZ’ → FALSE

Extract sub string from a string


Left (’ABCDE’,3) → ABC
Right (’ABCDE’,3) → CDE
Mid(’ABCDE’,2,3) → BCD

Left:
Returns a string containing a specified number of characters from the left side of a string.
Right:

17
Asprova expression possiblities
Returns a string containing a specified number of characters from the right side of a string.
Mid:
Returns a string containing a specified number of characters from a string.

Number to string, specifying the number of digits


GenStrSerialNum(15,4) → 0015

If the number has more digits than the specified by the function.
GenStrSerialNum(10015,4) → 10015
To keep the number of digits specified.
Right(GenStrSerialNum(10015,4),4) → 0015

Insert string
ME.Name=’ABC’
ME.Comment[1]=’ABC’

Convert date and number to string


Format(1.234,’#0.00’) → 1.23

Format:
Converts a time, a number, and so on to a string according to a specified format. Similar to Visual Basic Format function.

Date

Add and subtract time from date


#2007/06/01 12:00:00#+1d → 2007/06/02 12:00:00
ME.'Order '.LET-1w → Subtract one week from order LET.

Time between two dates


#2007/06/01 12:00:00#-#2007/06/01 00:00:00# → 12h
ME.'Order '.'End time'-ME.'Order '.LET → Late time

Present date
Now() → Return the present system date

Return next day, week or month’s start time


StartOfNextDay(#2007/6/1 12:00:00#,1) → 2007/06/02 00:00:00
StartOfNextWeek(#2007/6/1 12:00:00#,1) → 2007/06/04 00:00:00
StartOfNextMonth(#2007/6/1 12:00:00#,1) → 2007/07/01 00:00:00

StartOfNextDay:
Start of the day x day(s) after the specified point in time
StartOfNextWeek:
Start of the Monday of the week x weeks after the specified point in time.

18
Asprova expression possiblities
StartOfNextMonth:
Start of the month x months after the specified point in time.

Specifying negative number to the second parameter allows getting past dates.
StartOfNextDay(#2007/6/1 12:00:00#,-2) → 2007/05/30 00:00:00
StartOfNextWeek(#2007/6/1 12:00:00#,-2) → 2007/05/14 00:00:00
StartOfNextMonth(#2007/6/1 12:00:00#,-2) → 2007/04/01 00:00:00

“Day demarcation time” of project settings is used as a start time


8:00 is specified as day demarcation time.
StartOfNextDay(#2007/6/1 12:00:00#,1) → 2007/06/02 08:00:00

Return year, month and day from date


GetYearPart( #2007/6/1 12:00:00# ) → 2007
GetMonthPart( #2007/6/1 12:00:00# ) → 6 1-12
GetDayPart( #2007/6/1 12:00:00# ) → 1 1-31
GetHourPart( #2007/6/1 12:00:00# ) → 12 0-23
GetMinutePart( #2007/6/1 12:00:00# ) → 0 0-59
GetSecondPart( #2007/6/1 12:00:00# ) → 0 0-59
GetTimePart( #2007/6/1 12:00:00# ) → 12h

GetYearPart:
Returns the year part.
GetMonthPart:
Returns the month part.
GetDayPart:
Returns the day part.
GetHourPart:
Returns the hour part.
GetMinutePart:
Returns the minute part.
GetSecondPart:
Returns the second part.
GetTimePart:
Returns the time part.

Convert date to string - Format


Current date is 2007/06/01 15:00:00
Format( Now(), 'yyyy/MM/dd HH:mm:ss' ) → 2007/06/01 15:00:00
Format( Now(), 'yyyy/MM/dd hh:mm:ss' ) → 2007/06/01 03:00:00
Format( Now(), 'yy/M/d' ) → 07/6/1
Format( Now(), 'hh:mm tt' ) → 03:00 PM
Format( Now(), 'dddd' ) → Friday

19
Asprova expression possiblities
Convert date to number - ConvertTime
ConvertTime( 1d, 'm' ) → 1440
ConvertTime( 36h, 'd' ) → 1
ConvertTime( 36h, 'D' ) → 2

ConvertTime:
Converts a time span into a floating point value of the specified unit. The second parameter is letter (m,M,h,H,d,D).
Capital letter will round up the number, otherwise truncates the number. m is minute, h is hour and d is day.

Date from number - DateS、DateT、DateF


DateS( 2007,6,1) → 2007/06/01 00:00:00
DateT( 2007,6,1,6H ) → 2007/06/01 06:00:00
DateF(2007,6,1,6,30,30) → 2007/06/01 06:30:30

DateS:
Returns a time representing the specified year, month and day
DateT:
Returns a time representing the specified year, month, day, and time of day.
DateF:
Returns a time representing the specified year, month, day, hour, minute, and second.

Calculate the time advancing a certain length of time along the working time - AdvanceAlongResourceWorkingTime
AdvanceAlongResourceWorkingTime( ME.Resource, #2005/10/5 14:30#, 60m )
AdvanceAlongResourceWorkingTime( ME.Resource, #2005/10/5 14:30#, 60m )

AdvanceAlongResourceWorkingTime:
Returns the time resulting from advancing a certain length of time along the working time of a resource measured from a
specified starting time.

Number

Round the number of decimal places - Truncate、Roundup、Round


Truncate(1.55,1) → 1.5
Roundup(1.55,1) → 1.6
Round(1.55,1) → 1.6

Truncate:
Returns a number truncated to the specified number of decimal places.
Roundup:
Returns a number rounded up to the specified number of decimal places.
Round:
Returns a number rounded to the specified number of decimal places.

20
Asprova expression possiblities

Convert number to string - Format


Format(1.234,'#0.00') → 1.234
Format(5459.4, '##,##0.00') → 5,459.40
Format(5, '0.00%') → 500.00%

Format:
Converts a time, a number, and so on to a string according to a specified format. Similar use to Visual Basic Format
function.

Absolute value - Abs


Abs(-1) → 1

Square root - Sqrt


Sqrt(4) → 2

Power function (x to the yth power) - Power


Power(2,3) → 8

Trigonometric functions - Cos、Sin、Tan


Cos(3.14159265) → -1
Sin(3.14159265) → 0
Tan(3.14159265) → 0

Exponential function (xth power of e) - Exp


Exp(1) → 2.71828183

Log function – Ln, Log


Ln(2.71828183) → 1
Log(10) → 1

Ln:
Log function(base e)
Log:
Log function(base 10)

Normalize functions - NormalizeAscend, NormalizeDescend


NormalizeAscend(2) → 0.66666667
NormalizeDescend(2) → 0.33333333

NormalizeAscend:
x/(x+1) when x is large, the result is closer to 1; when x is closer to zero, the result is closer to zero.
NormalizeDescend:
1/(x+1) when x is large, the result is closer to zero; when x is closer to zero, the result is closer to 1.

Normalize functions are used for scheduling parameter weight settings.

21
Asprova expression possiblities
Use resource priority, as long as LET is met, otherwise returns zero.
IF(ME.'During evaluation - target operation'.'Order '.LET<ME.'During evaluation - production task time series'[0],
0,NormalizeAscend(ME.'During evaluation - master use instruction'.'Resource priority'))
IF(ME.TentAssignCurrOper.Order.LET<ME.TentAssignProdTimeSeries[0],
0,NormalizeAscend(ME.TentAssignCurrUseBomInst.ResourcePriority))

Array

There are array type properties and in such a case operator [] is used to reference the elements of the array. Index zero means
the last element of the array.

Reference the value


Comment has 3 values (A, B, C).
Comment[2] → B Reference the second comment
Comment[0] → C Reference the last comment
Comment → A;B;C Returns all the values delimited by semi colon

Set value
Comment has 3 values (A, B, C)
Comment[1]=’X’ → X;B;C Set new value to specified element
Comment[0]=’X’ → A;B;C;X Insert new value to the end
Comment[5]=’X’ → A;B;C;X Insert new value to the end
Comment=’X’ → X;X;X Set new value to all elements

Others

Verify existence of value - FValid


FValid( ME.'Order quantity') → TRUE if quantity has value

Remove value of the property


ME.EST=DELETE

22
How to access other object from one specific object

2. How to access another object from one specific object

Asprova uses a tree type object hierarchy linked each other by parent-child relationship. If ME is order object, ME.Parent will
get the order rot object. If ME is order root object, ME.Child[n] will get order object.

Root Project Order root Order 01

Order 02

Order 03
Item root

Usually specific properties are used to get the desired object, not the generic Parent/Child object relationship. These specific
properties could be interpreted as a shortcut (similar to windows shortcuts). Next few paragraphs will show you how to get
objects using these “shortcuts”.

Order
Object hierarchy around the order object is shown below.

Order First process


operation

Second process
operation

The expression below allows you to get the operation from the order. Operations are sorted by the process number; therefore
Child[1] returns the first process operation and Child[0] returns the last process operation.
Operation ME.Children[n]
ME.Child[n]
There is one shortcut property to get the last process operations. As split process means multiple last processes, this property is
of multi data type.
Final operations ME. 'Final operations'[n]
ME.FinalOperations[n]

If the operation is split, one intermediate object (split operation root object) is inserted between the operation and the order.

Split operation root Split operation 001


Order (First process)

Split operation 002


Therefore, to get spit operation objects becomes:
Split operation root ME.Children[n]
ME.Child[n]
Split operation ME.Children[n].Children[n]
ME.Child[n].Child[n]

23
How to access other object from one specific object

The expressions to get other objects are described below. Parent order represents the order in the product side and child order
represents the order in the material side.
Parent order ME.'Parent orders'[n]
ME.RightOrder[n]
Child order ME.'Child orders'[n]
ME.LeftOrder[n]
Rightmost order ME.'Rightmost orders'[n]
ME.RightmostOrder[n]
Leftmost order ME.'Leftmost orders'[n]
ME.LeftmostOrder[n]
Item ME.Item
ME.Item

Operation
Object hierarchy around operation object is shown below.

Operation
Order (1st process) Setup task

Production task

Teardown task

Input instruction

Output
instruction
Operation
(2nd process)

Order can be obtained from expression below (this expression is also valid for split root operation or split operation).
Order ME.’Order ‘
ME.Order

The order of tasks is guaranteed to be setup task, production task and teardown task. Each task could be get as a child object,
but it is not guaranteed that they always exist. Depending on the master data settings Child[1] could not be setup task. Therefore,
Asprova provides specific properties to get them.
Setup task ME.'Setup tasks'[1]
ME.SetupTask[1]
Production task ME.'Production tasks'[1]
ME.ProductionTask[1]
Teardown task ME.'Teardown tasks'[1]
ME.TeardownTask[1]
These properties are of multi data type. But for Ver.4.3.0, values other than 1 or 0, for index, is not valid.

Input instruction and output instruction are obtained not as a child object but from specific properties.
Input instruction ME.'Input instructions'[n]
ME.InputInstructions[n]
Output instruction ME.'Output instructions'[n]
ME.OutputInstructions[n]

24
How to access other object from one specific object
When assigned, input instruction and output instruction is moved under task object (see diagram below).
Operation
Order (1st process) Setup task

Production task Input instruction

Teardown task Output


instruction
Operation
(2nd process)

They could move under setup task, depending on master data settings. The examples below assume they moved under
production task.
Input instruction ME.'Production tasks'[1].'Input instructions'[n]
ME. ProductionTask[1].InputInstructions[n]
Output instruction ME.'Production tasks'[1].'Output instructions'[n]
ME. ProductionTask[1].OutputInstructions[n]

For split operations, the relationship becomes as a diagram below.


Split operation root Split operation
Order (1st process) 001 Setup task
(1st process)
Production task

Teardown task
Operation
(2nd process) Split operation
002
(2nd process)
Objects can be obtained as follows.
Split operation root ME.Parent
ME:split operation ME.Parent
Split operation ME.Children[n]
ME:split operation root ME.Child[n]

Using “shortcut” properties, it is possible to get other objects.


Previous process operation ME.'Previous process operations'[n]
ME.PrevOperation[n]
Next process operation ME.'Next process operations'[n]
ME.NextOperation[n]
Main output item ME.'Main output item'
ME.OperationOutMainItem
Sub products ME.'Production tasks'[1].'Output instructions'[n].Item
n=1 for main item ME.ProductionTask[1].OutputInstructions[n].Item
Main resource ME.'Main resource'
ME.OperationMainRes
Production task’s sub resource ME.'Production tasks'[1].'Use instructions'[n].Resource
n=1 for main resource ME.ProductionTask[1].UseInstructions[n].Resource

Master object used by the current operation is obtained as follows.


Master operation ME.'Master operation'
ME.Bom
Process selector ME.'Master operation'.Parent
ME.Bom.Parent
Task selector ME.Operation.Selector
ME.Operation.CurrSelectorBom
And the process number and process code are obtained as follows.

25
How to access other object from one specific object
Process number ME.'Master operation'.'Process number'
ME.Bom.ProcNo
Process code ME.'Master operation'.Process.'Process code'
ME.Bom.Proc.Code
As master operation code is the same as process code, the following expression is also valid to get process code.
Process code ME. 'Master operation'.Code
ME.Bom.Code

Task
Object hierarchy around task object is shown below.

Operation Setup task Use instruction M

Production task Use instruction M

Use instruction S0

Input instruction In

Output instruction Out

Teardown setup Use instruction M

Task types are the three shown above and Resource lock task (resource lock task is rarely used in expressions). Not always all
the tasks exist. If no setup time is specified, setup task will not exist. There will be always use instruction under tasks and
obtainable as follows.
Use instruction ME.'Use instructions'[n]
ME.UseInstructions[n]

Operation could be obtained calling ME.Parent, but the property below is defined.
Operation ME.Operation
ME.Operation

Input instruction and output instruction are under task when assigned. The master data settings define where each instruction
belongs to and obtainable calling the properties below.
Input instruction ME.'Input instructions'[n]
ME. InputInstructions[n]
Output instruction ME.'Output instructions'[n]
ME.OutputInstructions[n]

Use instruction
Order, operation and task are obtainable from use instruction as follows.
Order ME.Order
ME.Order
Operation ME.Operation
ME.Operation
Task ME.'Order/operation/task'
ME.Work

To get the master from use instruction:

26
How to access other object from one specific object
Master use instruction ME.'Master use instruction'
ME. UseBomInst

Input instruction and Output instruction


Object hierarchy around input instruction and output instruction is shown below.

Operation Setup task Use instruction M

Production task Use instruction M

Use instruction S0

Input instruction In

Output instruction Out


Peg
Operation Production task Use instruction M

Input instruction In

Output instruction Out


Order, operation and task are obtainable from expression below. Me.Work will return operation and not task, it unassigned.
Order ME.Order
ME.Order
Operation ME.Operation
ME.Operation
Task ME.'Order/operation/task'
ME.Work

Master input instruction is obtainable from input instruction.


Master input instruction ME. 'Master input instruction'
ME. InputBomInst
Master output instruction is obtainable from output instruction.
Master output instruction ME. 'Master output instruction'
ME. OutputBomInst

Peg object is obtainable from input instruction.


Peg object ME. 'Left pegs '[n]
ME.LeftPeg[n]
Peg object is obtainable from output instruction.
Peg object ME. 'Right pegs '[n]
ME.RightPeg[n]
These properties are multi data type as for each instruction could have multiple pegs.

27
How to access other object from one specific object
Peg object
Objects around peg object are obtainable from the expressions below.
Output instruction ME. 'Output instruction'
ME.LeftObject
Input instruction ME. 'Input instruction'
ME.RightObject
Output side operation ME. 'Operation (left)'
ME.LeftOperation
Input side operation ME.' 'Operation (right)'
ME.RightOperation
Output side order ME.'Order (left)'
ME.LeftOrder
Input side order ME.'Order (right)'
ME.RightOrder

Item
Object hierarchy around item object is shown below.

Item Master operation Master use instruction


10 M

Master operation Master use instruction


20 M

Master use instruction


S0

In the case process selector and task selector exists. Master input
instruction In

Master output
instruction Out
Process
Item Master operation Master use instruction
selector 1
10 M

Master operation Task selector 1 Master use instruction


Process 20 M
selector 2
Task selector 2 Master use instruction
M
Objects around item object are obtainable from the expressions below.
Process selector ME.'Process selectors (item)'[n]
ME. ProcSelector[n]
Master operation ME.Children[n]
ME.Child[n]
Task selector (process selector exists) ME.'Process selectors (item)'[n].Children[n]
ME.ProcSelector[n].Child[n]
Task selector (no process selector) ME.'Process selectors (item)'[n].Children[n].Children[n]
ME.ProcSelector[n].Child[n].Child[n]

Parent item and component item are obtainable from the expressions below.

28
How to access other object from one specific object
Parent item ME.'Parent items'[n]
ME.RightItem[n]
Component item ME.'Component items'[n]
ME.LeftItem[n]
Parent item (recursive) ME.'Parent items (recursive)'[n]'
ME.RightmostItem[n]
Component item (recursive) ME.'Component items (recursive)'[n]
ME.LeftmostItem[n]

Master use instruction


Objects around master use instruction are obtainable from the expressions below.
Final item ME.'Final item'
ME. FinalItem
Master operation (no task selector) ME.'Master operation/master task/selector'
ME.Bom
Master operation (task selector exists) ME.'Master operation/master task/selector'.Parent
ME.Bom.Parent
Task selector ME.'Master operation/master task/selector'
ME.Bom
Use Instruction Master ME.'Use instruction master'
ME.Master
Use instruction ME.'Use instructions'[n]
ME.UseBomInst_Rev[n]

Master input instruction


Objects around master input instruction are obtainable from the expressions below. Different from master use instruction, it
doesn’t exist under task selector.
Item ME.Item
ME.Item
Final item ME.'Final item'
ME. FinalItem
Master operation ME.'Master operation/master task/selector'
ME.Bom
Input instruction master ME.'Input instruction master'
ME.Master
Input instruction ME.'Input instructions'[n]
ME.InputBomInst_Rev[n]

Master output instruction


Objects around master output instruction are obtainable from the expressions below. Different from master use instruction, it

29
How to access other object from one specific object
doesn’t exist under task selector.
Item ME.Item
ME.Item
Final item ME.'Final item'
ME. FinalItem
Master operation ME.'Master operation/master task/selector'
ME.Bom
Output instruction master ME.'Output instruction master'
ME.Master
Output instruction ME.'Output instructions' [n]
ME.OutputBomInst_Rev[n]

30
Display color expression
3. Display color expression

Display color can be customized in many places for Gantt chart or table windows. Display color expression uses internal
function RGB or natural number between 1-32.

Specify Gantt chart bar color and flag color


Bar color expression ME Gantt chart bar
Bar flag color expression OTHER Not specified
(Resource Gantt chart display settings-[Bar] tab) HOLDER Time chart

ME represents Gantt chart bar object in the properties above. The following objects can get obtained from Gantt chart bar
object.
1. Use instruction(UseInstruction)
2. Task(Task)
3. Operation(Operation)
4. Order(Order)
5. Order/Operation/Task(Work) … Object that holds use instruction
6. Item(Item)
7. Resource(Resource)
8. Process(Process)
9. Spec N(SpecN)

By order or item display color

Display order display color


ME.Order.'Display color'
ME.Order.Color

Display order’s item display color


ME.Order.Item.'Display color'
ME.Order.Item.Color

Display order’s spec 1 display color


ME.Order.'Spec 1'.'Display color'
ME.Order.Spec1.Color

By order priority

Red for priority 90 or greater, blue for 50-90, green for 50 or lower
IF(ME.Order.Priority>=90,RGB(255,0,0),IF(ME.Order.Priority<50,RGB(0,255,0),RGB(0,0,255)))
IF(ME.Order.Priority>=90,RGB(255,0,0),IF(ME.Order.Priority<50,RGB(0,255,0),RGB(0,0,255)))

By enum type property

31
Display color expression
Color by order type
ME.Order.'Order type'+1
ME.Order.Type+1
By adding 1, it is converting from enum to number.

By lateness and earliness violation

If late, display red


IF(ME.'Order/operation/task'.Lateness>0s,RGB(255,0,0),0)
IF(ME.Work.Lateness>0s,RGB(255,0,0),0)

If late, display red; otherwise display green


IF(ME.'Order/operation/task'.Lateness>0s,RGB(255,0,0),RGB(0,255,0))
IF(ME.Work.Lateness>0s,RGB(255,0,0),RGB(0,255,0))

Red for EST violation and white otherwise.


IF(ME.'Order/operation/task'.Earliness>0s,RGB(255,0,0),RGB(255,255,255))
IF(ME.Work.Earliness>0s,RGB(255,0,0),RGB(255,255,255))

Blue when the right order LET is current month, red when past months, black when future months, and green when unspecified.
IF(FValid(ME.Order.'Right order earliest LET'),IF(ME.Order.'Right order earliest LET'>
StartOfNextMonth(PROJECT.'Scheduling basis time',1),RGB(0,0,0),IF(ME.Order.'Right order earliest LET'<
StartOfNextMonth(PROJECT.'Scheduling basis time',0),RGB(255,0,0),RGB(0,0,255))),RGB(0,255,0))
IF(FValid(ME.Order.RightOrderEarliestPeggingLET),IF(ME.Order.RightOrderEarliestPeggingLET>
StartOfNextMonth(PROJECT.BasisTime,1),RGB(0,0,0),IF(ME.Order.RightOrderEarliestPeggingLET<
StartOfNextMonth(PROJECT.BasisTime,0),RGB(255,0,0),RGB(0,0,255))),RGB(0,255,0))

Red for lateness for 3 days or more, yellow for less than 3 days, and white otherwise.
IF(ME.'Order/operation/task'.Lateness>3d,RGB(255,0,0),IF(ME.'Order/operation/task'.Lateness>0s,
RGB(255,255,0),RGB(255,255,255)))
IF(ME.Work.Lateness>3d,RGB(255,0,0),IF(ME.Work.Lateness>0s,RGB(255,255,0),RGB(255,255,255)))

By color graduation
Graduated blue coloring (using num spec 1, set from 0-32)
RGB(255*ME.Order.'Num spec 1'/32,255*ME.Order.'Num spec 1'/32,200)
RGB(255*ME.Order.NumSpec1/32,255*ME.Order.NumSpec1/32,200)
Num spec has value between 0-32.
Specify use instruction bar text color expression
Use instruction bar text color expression ME Use instruction
(Resource Gantt chart display settings-[Resource Gantt] tab) OTHER Not specified
HOLDER Time chart

32
Display color expression

By lateness and earliness violation

Red for lateness, blue for EST violation.


IF(ME.Operation.Lateness>0s,RGB(255,0,0),IF(ME.Operation.Earliness>0s,RGB(0,0,255),0))
IF(ME.Operation.Lateness>0s,RGB(255,0,0),IF(ME.Operation.Earliness>0s,RGB(0,0,255),0))

Red for lateness, blue for EST violation, yellow for due date within a day.
IF(ME.Operation.Lateness>0s,RGB(255,0,0),
IF(ME.Operation.Earliness>0s,RGB(0,0,255),
IF(ME.Order.LET-ME.Operation.'Production end time'<=1d,RGB(255,255,0),0)))
IF(ME.Operation.Lateness>0s,RGB(255,0,0),IF(ME.Operation.Earliness>0s,RGB(0,0,255),
IF(ME.Order.LET-ME.Operation.OperationProductionEndTime<=1d,RGB(255,255,0),0)))

Red for lateness, blue for EST violation, yellow for due date within a day.
IF(ME.'Order/operation/task'.Lateness>0s,
IF(ME.'Order/operation/task'.'End time'>ME.Order.LET||
ME.'Order/operation/task'.'End time'>ME.Operation.'User specified LET',
RGB(255,0,0),RGB(255,255,0)),IF(ME.'Order/operation/task'.Earliness>0s,
IF(ME.'Order/operation/task'.'Start time'<ME.Order.EST||
ME.'Order/operation/task'.'Start time'<ME.Operation.'User specified EST',RGB(0,0,255),RGB(0,255,255)),0))
IF(ME.Work.Lateness>0s,IF(ME.Work.EndTime>ME.Order.LET||ME.Work.EndTime>ME.Operation.ULET,RGB(255,0,0),RGB(255,255,0)),
IF(ME.Work.Earliness>0s,IF(ME.Work.StartTime<ME.Order.EST||ME.Work.StartTime<ME.Operation.UEST,RGB(0,0,255),RGB(0,255,255)),0))

Specify order bar text color expression


Order bar inside text color expression ME Order
Order bar right text color expression OTHER Not specified
(Order Gantt chart display settings-[Order Gantt] tab) HOLDER Time chart

By order display color


ME.'Display color'
ME.Color

By order quantity’s number of digits


Log('Order quantity')+1
Log(Qty)+1

By replenishment order
Brown for replenishment orders
IF('Order class'=='Replenishment order',7,0)
IF(IsReplenishmentOrder=='1',7,0)

By order priority
Pink when the priority is 90 or more, blue when 50 to less than 90, and green when less than 50.

33
Display color expression
IF(Priority>=90,18,IF(Priority<50,26,9))
IF(Priority>=90,18,IF(Priority<50,26,9))

By lateness and earliness violation


Red for lateness, blue for EST violation, yellow for due date within a day.
IF(ME.Lateness>0s,RGB(255,0,0),IF(Abs(ME.Lateness)<=1d,RGB(255,255,0),IF(ME.Earliness>0s,RGB(0,0,255),0)))
IF(ME.Lateness>0s,RGB(255,0,0),IF(Abs(ME.Lateness)<=1d,RGB(255,255,0),IF(ME.Earliness>0s,RGB(0,0,255),0)))

By month of the EST, month of the LET


GetMonthPart(EST)
GetMonthPart(EST)

GetMonthPart(LET)
GetMonthPart(LET)

Specify operation bar text color expression


Operation bar inside text color expression ME Operation
Operation bar right text color expression OTHER Not specified
(Order Gantt chart display settings-[Order Gantt] tab) HOLDER Time chart

By order priority
Red when the priority is 90 or more, blue when 50 to less than 90, and green when less than 50.
IF(ME.'Order '.Priority>=90,RGB(255,0,0),IF(ME.'Order '.Priority<50,RGB(0,255,0),RGB(0,0,255)))
IF(ME.Order.Priority>=90,RGB(255,0,0),IF(ME.Order.Priority<50,RGB(0,255,0),RGB(0,0,255)))

By lateness and earliness


Red for lateness, blue for EST violation.
IF(ME.Lateness>0s,RGB(255,0,0),IF(ME.Earliness>0s,RGB(0,0,255),0))
IF(ME.Lateness>0s,RGB(255,0,0),IF(ME.Earliness>0s,RGB(0,0,255),0))

Red for lateness, blue for EST violation, yellow for due date within a day.
IF(ME.Lateness>0s,RGB(255,0,0),IF(ME.Earliness>0s,RGB(0,0,255),
IF(ME.'Order '.LET-ME.'Production end time'<=1d,RGB(255,255,0),0)))

IF(ME.Lateness>0s,RGB(255,0,0),IF(ME.Earliness>0s,RGB(0,0,255),
IF(ME.Order.LET-ME.OperationProductionEndTime<=1d, RGB(255,255,0),0)))

Yellow and light blue for text color of operation bars in reverse time relationship.

34
Display color expression
IF(ME.Lateness>0s,IF(ME.'End time'>ME.'Order '.LET||ME.'End time'>ME.'User specified LET',
RGB(255,0,0),RGB(255,255,0)),IF(ME.Earliness>0s,IF(ME.'Start time'<ME.'Order '.EST||
ME.'Start time'<ME.'User specified EST',RGB(0,0,255),RGB(0,255,255)),0))

IF(ME.Lateness>0s,IF(ME.EndTime>ME.Order.LET||ME.EndTime>ME.ULET,RGB(255,0,0),
RGB(255,255,0)),IF(ME.Earliness>0s,IF(ME.StartTime<ME.Order.EST||ME.StartTime<ME.UEST,RGB(0,0,255),RGB(0,255,255)),0))

Specify task bar text color expression


Task bar internal text color expression ME Task
Task bar right text color expression OTHER Not specified
(Order Gantt chart display settings-[Order Gantt] tab) HOLDER Time chart

By order priority
Red when the priority is 90 or more, blue when 50 to less than 90, and green when less than 50.
IF(ME.'Order '.Priority>=90,RGB(255,0,0),IF(ME.'Order '.Priority<50,RGB(0,255,0),RGB(0,0,255)))
IF(ME.Order.Priority>=90,RGB(255,0,0),IF(ME.Order.Priority<50,RGB(0,255,0),RGB(0,0,255)))

By lateness and earliness violation


Red for lateness, blue for EST violation.
IF(ME.Lateness>0s,RGB(255,0,0),IF(ME.Earliness>0s,RGB(0,0,255),0))
IF(ME.Lateness>0s,RGB(255,0,0),IF(ME.Earliness>0s,RGB(0,0,255),0))

Red for lateness, blue for EST violation, yellow for due date within a day.
IF(ME.Operation.Lateness>0s,RGB(255,0,0),IF(ME.Operation.Earliness>0s,RGB(0,0,255),
IF(ME.'Order '.LET-ME.Operation.'Production end time'<=1d,RGB(255,255,0),0)))
IF(ME.Lateness>0s,RGB(255,0,0),IF(ME.Earliness>0s,RGB(0,0,255),
IF(ME.Order.LET-ME.OperationProductionEndTime<=1d,RGB(255,255,0),0)))

Yellow and light blue for text color of task bars in reverse time relationship.
IF(ME.Lateness>0s,IF(ME.'End time'>ME.'Order '.LET||ME.'End time'>ME.'User specified LET',
RGB(255,0,0),RGB(255,255,0)),IF(ME.Earliness>0s,IF(ME.'Start time'<ME.'Order '.EST||
ME.'Start time'<ME.'User specified EST',RGB(0,0,255),RGB(0,255,255)),0))
IF(ME.Lateness>0s,IF(ME.EndTime>ME.Order.LET||ME.EndTime>ME.ULET,RGB(255,0,0),RGB(255,255,0)),

IF(ME.Earliness>0s,IF(ME.StartTime<ME.Order.EST||ME.StartTime<ME.UEST,RGB(0,0,255),RGB(0,255,255)),0))

Specify table cells background and text color


Background color expression ME Depend on property definition
Text color expression OTHER Not specified
(Property definition: right click on table window header part ->[Property definition]) HOLDER Property definition

ME depends on property definition. ME is order object if on order table and item object if on item table.

35
Display color expression
Pink when the priority is 90 or more, blue when 50 to less than 90, and green when less than 50.
IF(Priority>=90,18,IF(Priority<50,26,9))
IF(ME.Order_Priority>=90,18,IF(ME.Order_Priority<50,26,9))

36
String expression
4. String expression

Allow customization of strings displayed on table windows and Gantt charts and to add properties that is not displayed by
default.

Specify strings for use instruction bar, data tip, status bar on Gantt chart

Use instruction bar text expression ME Use instruction


Data tip text expression OTHER Not specified
Use instruction status bar text expression HOLDER Time chart
(Resource Gantt chart display settings-[Resource Gantt] tab)

Display order properties


Order code ME.Order
ME.Order
or
ME.Order.Code
ME.Order.Code
Item ME.Order.Item
ME.Order.Item
Qty ME.Order.'Order quantity'
ME.Order.Qty
LET ME.Order.LET
ME.Order.LET
SpecN(1,2, … 999) ME.Order.'Spec 1'
ME.Order.Spec1
Priority ME.Order.Priority
ME.Order.Priority
Start time(Earliest start time of all operations’ME.Order.'Start time'
use instruction) ME.Order.StartTime
End time(Latest end time of all operations’ME.Order.'End time'
use instruction) ME.Order.EndTime
Lead time ME.Order.'Lead time'
ME.Order.LeadTime
EST, including the right order ME.Order.'Right order earliest LET'
ME.Order.RightOrderEarliestPeggingLET
EST of right sales order ME.Order.'Right sales order earliest due date'
ME.Order.SalesOrderPeggingLET
Final process operation ME.Order.'Final operations'[n]
ME.Order.FinalOperations[n]

Display operation properties


Operation code ME.Operation
ME.Operation
or
ME.Operation.Code
ME.Operation.Code
Item ME.Operation.'Main output item'
ME.Operation.OperationOutMainItem
Production quantity ME.Operation.'Production quantity'
ME.Operation.OperationOutMainItemQty
Main resource ME.Operation.'Main resource'
ME.Operation.OperationMainRes

37
String expression
Last dispatching order ME.Operation.'Last dispatching order'
ME.Operation.LastAssignmentOrder

Display spec specified at order and item


Spec 1
GetApplicableSpec(1,ME.Operation)
GetApplicableSpec(1,ME.Operation)

Num spec 1
GetApplicableNumSpec(1,ME.Operation)
GetApplicableNumSpec(1,ME.Operation)

GetApplicableSpec:
Spec applicable to the operation. When a spec is applied to the order, will apply that spec. Otherwise, will apply the spec
specified for the item.
GetApplicableNumSpec:
Num spec applicable to the operation. When a num spec is applied to the order, will apply that num spec. Otherwise, will
apply the num spec specified for the item.

Do not display setup string


IF(ME.'Order/operation/task'.Type=='Production task',ME.Order,'')
IF(ME.Work.Type=='P',ME.Order,'')

Display user added properties


It is possible to display user added properties in the same way as Asprova provided properties.
ME.Order. 'My Property'
ME.Order.MyProperty

Specify string for Gantt chart’s order bar, data tip, status bar

Order bar inside text expression ME Order


Order bar right text expression OTHER Not specified
Order left part text expression HOLDER Time chart
Order data tip text expression
Order status bar text expression
(Order Gantt chart display settings-[Order Gantt] tab)

Order code
ME
ME

Order code + Quantity + EST + LET (With descriptive text)


'Order code='+ME+'\n'+'Quantity='+ME.'Order quantity'+'\n'+'EST='+ME.EST+'\n'+'LET='+ME.LET
'Order code='+ME+'\n'+'Quantity='+ME.Qty+'\n'+'EST='+ME.EST+'\n'+'LET='+ME.LET

38
String expression

Order code + Item + Quantity + LET


ME+'\n'+ME.Item+'\n'+ME.'Order quantity'+'\n'+ME.LET
ME+'\n'+ME.Item+'\n'+ME.Qty+'\n'+ME.LET

Order code+Item code+LET+Priority


<01>(Qty:50,Item:ProductD,LET:2007/07/02 17:00:00,Priority:80)
'<'+ME+'>'+'(Qty:'+ME.'Order quantity'+',Item:'+ME.Item+',LET:'+ME.LET+',Priority:'+ME.Priority+')'
'<'+ME+'>'+'(Qty:'+ME.Qty+',Item:'+ME.Item+',LET:'+ME.LET+',Priority:'+ME.Priority+')'

Specify string for Gantt chart’s operation bar, data tip, status bar

Operation bar inside text expression ME Operation


Operation bar right text expression OTHER Not specified
Operation left part text expression HOLDER Time chart
Operation data tip text expression(Order Gantt chart)
Operation status bar text expression
(Order Gantt chart display settings, any time chart display
settings-[Order Gantt] tab)

Operation code
ME
ME

Process number (Process code) + Main resource + Start time + End time + Quantity
ME+'('+ME.'Master operation'+')\n'+ME.'Main resource'+' '+ME.'Production start time'+
' - '+ME.'Production end time'+'\n'+ME.'Production quantity'
ME+'('+ME.Bom+')\n'+ME.OperationMainRes+' '+ME.OperationProductionStartTime+

' - '+ME.OperationProductionEndTime+'\n'+ME.OperationOutMainItemQty

Operation code + Item code + Quantity + Order comments


'Operation='+ME+'\n'+'Item='+ME.'Main output item'+'\n'+'Quantity='+ME.'Production quantity'+
'\n'+'Order comments='+ME.'Order '.Comments
'Operation='+ME+'\n'+'Item='+ME.OperationOutMainItem+'\n'+'Quantity='+ME.OperationOutMainItemQty+'\n'+
'Order comments='+ME.Order.Comments

Last dispatching order


ME.'Last dispatching order'
ME.LastAssignmentOrder

39
String expression
Specify string for Gantt chart’s task bar, data tip, status bar

Task bar inside text expression (Order Gantt chart) ME Task


Task bar right text expression (Order Gantt chart) OTHER Not specified
Task left part text expression (Any time chart) HOLDER Time chart
Task data tip text expression (Order Gantt chart)
Task status bar text expression (Order Gantt chart)
(Order Gantt chart display settings, any time chart display
settings-[Order Gantt] tab)

Task code
ME
ME

Task code (Net time minutes)


ME+' ('+Format(ME.'Use instructions'[1].'Total use time'/1m,'0 minutes')+')'
ME+' ('+Format(ME.UseInstructions[1].TotalUseTime/1m,'0 minutes')+')'

Task code + Start time + End time


ME+'\n'+ME.'Start time'+' - '+ME.'End time'
ME+'\n'+ME.StartTime+' - '+ME.EndTime

Customize values shown on Inventory graph

Number format ME Inventory value


(Inventory graph display settings-[Inventory graph] tab) OTHER Not specified
HOLDER Time chart

Format inventory value


Format(ME.Value,'0.##')
Format(ME.Value,'0.##')

Monetary value display (dollars)


'$'+Format(ME.Value*ME.Item.'Unit price','0')
'$'+Format(ME.Value*ME.Item.Price,'0')

40
String expression
Specify virtual property expression

Virtual property expression ME Depend on property definition


(Property definition-[General] tab) OTHER Not specified
HOLDER Property definition

Allows reference other objects property by adding a new property and specifying virtual property expression.

Display item’s item name on to order table


ME.Item.'Item name'
ME.Item.Name

Display first operation’s status on to order table


ME.Children[1].Work_Status
ME.Child[1].Work_Status

Specify display expression

Display expression ME Depend on property definition


(Property definition-[Display settings] tab) OTHER Not specified
HOLDER Property definition

Allow to customize display format by specifying display expression.

Display order table’s LET as “Year 2007, 06 / 01”


Format(ME.LET,'Year yyyy, MM / dd')
Format(ME.LET,'Year yyyy, MM / dd')

Specifying display reverse expression allows set LET in the format “Year 2007, 06 / 01”.
DateS(FindNumberL(INPUT,1),FindNumberL(INPUT,2),FindNumberL(INPUT,3))
DateS(FindNumberL(INPUT,1),FindNumberL(INPUT,2),FindNumberL(INPUT,3))
“INPUT” represents the input string.。Using FindNumberL internal function, it gets the year, month, day and set it.

Display changing the unit of order quantity


Specify the order quantity unit as “box”. If each box has 100 units, the expression becomes:
ME.'Order quantity'/100
ME.Qty/100

Specifying display reverse expression allows setting of values on it.


HOLDER.'Order quantity'=100*FindNumberL(INPUT,1)
HOLDER.Qty=100*FindNumberL(INPUT,1)

If the quantity per box depends on item, the expression becomes as follows:

41
String expression
ME. 'Order quantity' /ME.Item. 'Container capacity'
ME.Qty/ME.Item.ContainerCapacity
*container capacity is user added property.
Display reverse expression becomes as follows.
HOLDER. 'Order quantity'=ME.Item. 'Container capacity'*FindNumberL(INPUT,1)
HOLDER.Qty=ME.Item.ContainerCapacity*FindNumberL(INPUT,1)

Format production quantity to 2 digits after decimal point on operation table


Format(ME.'Production quantity','#.##')
Format(ME.OperationOutMainItemQty,'#.##')

42
Time expression
5. Time expression

Specify project time periods

Scheduling basis time ME Project


Assignment start time OTHER Not specified
Assignment end time HOLDER Project
Display start time
Display end time
Freeze period end time
Instruction output period end time
Theoretical inventory calculation time
(Project-[Time periods] tab)

Start of day after project load time


StartOfNextDay(PROJECT.'Project load time',1)
StartOfNextDay(PROJECT.StartupTime,1)

Start of day after project load time + 8 hours


StartOfNextDay(PROJECT. 'Project load time',1)+8h
StartOfNextDay(PROJECT.Project_StartupTime,1)+8h

Three days before project basis time


PROJECT.'Scheduling basis time'-3d
PROJECT.BasisTime-3d

365 days after project basis time


PROJECT.'Scheduling basis time'+365d
PROJECT.Project_BasisTime+365d

Specify inventory valid period

Inventory valid period ME Input instruction


(Item-[Inventory] tab) OTHER Not specified
HOLDER Item

Within 3 days after the completed time


3d
3d

Inventory valid period ME Output instruction


(Order-[General] tab) OTHER Not specified
HOLDER Order

43
Time expression
Specify absolute date
2007/06/01 17:00:00
#2007/06/01 17:00:00#
# 2007/06/01 17:00:00#

1 week after LET


HOLDER.LET+1w
HOLDER.LET+1w

44
Conditional expression
6. Conditional expression

Specify conditions to decide which master to be used on Integrated master editor table, resource, item, or pegging conditions.
This expression should return TRUE/FALSE value.

Specify Valid condition expression based on order

Process selector valid condition ME Order


(Integrated master editor table-[Process selector valid condition]) OTHER Not specified
HOLDER Master (Process selector/Master operation/Task
selector)

Valid condition ME Order


(Integrated master editor table-click [Input instruction] column→Property OTHER Not specified
window [General] tab) HOLDER Master input instruction

Valid condition ME Order


(Integrated master editor table-click [Input instruction] column→Property OTHER Not specified
window [General] tab) HOLDER Master output instruction

Order quantity is 100 or greater


ME.'Order quantity'>=100
ME.Qty>=100

Order spec 1 is equal to 'A' and order spec 2 is equal to 'B'


ME.'Spec 1'=='A'&&ME.'Spec 2'=='B'
ME.Spec1=='A'&&ME.Spec2=='B'

Order EST is a week or more ahead


ME.EST>PROJECT.'Scheduling basis time'+1w
ME.EST>PROJECT.BasisTime+1w

Specify Valid condition expression based on operation

Task selector valid condition ME Operation


(Integrated master editor table-[Task selector valid condition]) OTHER Not specified
HOLDER Master (Process selector/Master operation/Task selector)

Valid condition ME Operation


(Integrated master editor table-[Valid condition]) OTHER Not specified
HOLDER Master use instruction

Valid condition ME Operation


(Resource-[Settings] tab) OTHER Not specified
HOLDER Resource

Refer to the link below for explanation on how to use these three properties:
(http://www.asprova.com/faq/000574.html)

45
Conditional expression
Operation spec 1 is equal to 'A'
GetApplicableSpec(1,ME)=='A'
GetApplicableSpec(1,ME)=='A'

Operation quantity is 100 or greater


ME.Operation.'Production quantity'>=100
ME.Operation.OperationOutMainItemQty>=100

To set next resource constraint going farther the process, specify the expression below with master use instruction for each
resource.
(Limited for forward direction)
Two operations previous, the operation was assigned to resource A
ME.'Previous process operations'[1].'Previous process operations'[1].'Assignment flag'!=
'Unassigned'&&ME.'Previous process operations'[1].'Previous process operations'[1].'Main resource'=='A'
ME.PrevOperation[1].PrevOperation[1].IsAssigned!='0'&&ME.PrevOperation[1].PrevOperation[1].OperationMainRes=='A'

Specify pegging condition

Pegging condition ME Output instruction


(Item-[Lot] tab) OTHER Input instruction
HOLDER Item

Order spec 1 is equal


ME.Order.'Spec 1'==OTHER.Order.'Spec 1'
ME.Order.Spec1==OTHER.Order.Spec1

Order spec 1 is equal and order spec 2 is equal


ME.Order.'Spec 1'==OTHER.Order.'Spec 1'&&ME.Order.'Spec 2'==OTHER.Order.'Spec 2'
ME.Order.Spec1==OTHER.Order.Spec1&&ME.Order.Spec2==OTHER.Order.Spec2

Specify furnace valid condition

Furnace valid condition ME Operation


Furnace valid condition(Setup) OTHER Operation
Furnace valid condition(Teardown) HOLDER Resource
(Resource-[Settings] tab)

Operation spec 1 is equal


GetApplicableSpec(1,ME.Operation)
GetApplicableSpec(1,ME.Operation)

46
Property assignment expression

7.Property assignment expression

Using “=” operator in the expression allows to copy/specify properties.

Specify the properties to set for operations when exploding orders

Operation property assign expressions ME Operation


(Project-[Settings] tab) OTHER Order
HOLDER Project

Copy order comment to operation


Copy the first comment
ME.Comments[1]=OTHER.Comments[1]
ME.Comments[1]=OTHER.Comments[1]
Creating a new property to the operation and specifying virtual property expression to reference the order comments property is
recommended in most cases (support of synchronization and less memory usage).

Specify the properties to set for operations when splitting an operation

Split child operation property assign expressions ME Operation(split child operation)


(Project-[Settings] tab) OTHER Operation(split root operation)
HOLDER Project

Copy split root operation comment to split child operation


Copy the first comment
ME.Comments[1]=OTHER.Comments[1]
ME.Comments[1]=OTHER.Comments[1]
Creating a new property to the operation and specifying virtual property expression to reference the split root operation is
recommended in most cases (support of synchronization and less memory usage).

Copy property from one order to another

Replenishment manufacturing order property assign ME Order(replenishment order)


expressions OTHER Order(pegged parent order)
HOLDER Project
Replenishment purchase order property assign
expressions
One to one pegged order property assign expressions
(Project-[Settings] tab)

Copy order LET


ME.LET=OTHER.LET
ME.LET=OTHER.LET

47
Property assignment expression
Copy order display color
ME.'Display color'=OTHER.'Display color'
ME.Color=OTHER.Color

Copy order spec

Spec 1
ME.'Spec 1'=OTHER.'Spec 1'
ME.Spec1=OTHER.Spec1

Num spec 1
ME.'Num spec 1'=OTHER.'Num spec 1'
ME.NumSpec1=OTHER.NumSpec1

Copy order comment

Copy the first comment


ME.Comments[1]=OTHER.Comments[1]
ME.Comments[1]=OTHER.Comments[1]

Copy all comments


ME.Comments=OTHER.Comments
ME.Comments=OTHER.Comments

Copy/Set property on Import/Export

Import property conversion expression ME Based on DBIO object


(Data I/O Settings-[Import] tab) OTHER Not specified
Export property conversion expression HOLDER DBIO object
(Data I/O Settings-[Export] tab)

ME depends on which DBIO object it refers to. For DBIO object for order, ME refers to order object; for DBIO object for item
table, ME refers to item object.

Specify manufacturing order to order type on import (Import property conversion expression for order table).
ME.'Order type'='Manufacturing order'
ME.Type=’M’

Set order property at specified timing

The Modify properties command is a command by which you can modify values of order and operation properties at any
desired timing, such as during the scheduling, menu, loading/saving data. Insert Modify property command to scheduling
parameter to execute it during rescheduling or specify this parameter as a custom menu to call it from the menu. For more
details refer to [Modify properties command] (HelpNo.:778300) help file. Insert this parameter under
[AfterDeSerializeProject][ AfterSerializeProject] plug-in key (menu [Schedule]-[Command Editor]) to execute it during data
loading/saving.

48
Property assignment expression
Order expression ME Order
(Modify properties command-[General] tab) OTHER Not specified
HOLDER Modify properties command

Set 3 days before the assigned date as an order EST


ME.EST=ME.'Start time'-3d
ME.EST=ME.StartTime-3d

Remove property
ME.EST=DELETE
ME.EST=DELETE

Set operation property at specified timing

Modify properties command allows you to set operation properties when rescheduling or from menu.
Operation expression (Modify properties command) ME Operation
OTHER Not specified
HOLDER Modify properties command

Confirm operation as released


ME.Status='Released'
ME.Status=’I’

49
Filter expression
8.Code generation expression

Customize operation code

Operation code expression ME Operation


(Project-[Code generation] tab) OTHER Not specified
HOLDER Project

Specify here the code format for manufacturing operations.

Order code+Process numbers


ME.'Order '.'Order code'+':'+ME.'Master operation'.'Process number'
ME.Order.Code+':'+ME.Bom.ProcNo

Order code+Process code


ME.'Order '.'Order code'+':'+ME.'Master operation'.Process
ME.Order.Code+':'+ME.Bom.Proc

Customize replenishment order code

Replenishment manufacturing order code expression ME Order


Replenishment purchase order code expression OTHER Not specified
(Project-[Code generation] tab) HOLDER Project

Specify here the code format for replenishment orders.

M + 6-digit serial number


'M'+GenStrSerialNum(PROJECT.'Replenishment manufacturing order serial number',6)
'M'+GenStrSerialNum(PROJECT.ManufacturingOrderSerialNumber,6)

Unique code
GenStrSerialNum(ME.'Object ID',9)
GenStrSerialNum(ME.ObjectID,9)

Manufacturing order/purchase order common serial number


'M'+GenStrSerialNum(PROJECT.'Replenishment manufacturing order serial number'+
PROJECT.'Replenishment purchase order serial number',6)
'M'+GenStrSerialNum(PROJECT.ManufacturingOrderSerialNumber+PROJECT.PurchaceOrderSerialNumber,6)

Item code + 6-digit serial number


ME.Item+':'+GenStrSerialNum(PROJECT.'Replenishment manufacturing order serial number',6)
ME.Item+':'+GenStrSerialNum(PROJECT.ManufacturingOrderSerialNumber,6)

50
Filter expression
Auto-generated one-to-one order code expression ME Order
(Project-[Code generation] tab) OTHER Not specified
HOLDER Project

Specify here the code format for orders auto-generated using the property Items to peg one-to-one ([Yes (one-to-one
production)], Yes (inventory + one-to-one production), [Yes (supply-demand adjustment one-to-one production)], or order
property [Items to peg one-to-one] is specified).

1 to 1 pegging parent order code + Item code


Using original parent order code and the item code
ME.'Rightmost one-to-one pegging order'.'Order code'+'-'+ME.Item.'Item code'
ME.OneToOnePeggingOrderSourceGeneric.Code+'-'+ME.Item.Code

Customize event order code

Event order code expression ME Order


(Project-[Code generation] tab) OTHER Not specified
HOLDER Project

Specify here the code format for event orders.

Event condition from which an event order occurred


ME.'Event condition'
ME.Event

Customize auto-generated intermediate item code expression

Auto-generated intermediate item code expression ME Order


(Project-[Code generation] tab) OTHER Not specified
HOLDER Project

Specify here the code format for auto-generated intermediate items.

Item code+Process number


ME.'Final item'.'Item code'+'-'+ME.'Process number'
ME.FinalItem.Code+'-'+ME.Bom_ProcNo

Customize the code format for inventory objects generated during theoretical inventory calculation

Theoretical inventory code expression ME Order


(Project-[Code generation] tab) OTHER Not specified
HOLDER Project

Theoretical Inventory (Item code)


'Theoretical Inventory('+ME.Item.'Item code'+')'
'Theoretical Inventory('+ME.Item.Code+')'

51
Filter expression

9.Filter expression

Specify the expressions to return TRUE and filter the objects.


The main properties are:
1. Filter expression on table window
2. Scheduling parameter settings’ filter orders, filter operations

General purpose filter expressions

Filter by Code’s first letter.


If Code’s first letter is ‘A’
Left(ME,1)=='A'
Left(ME,1)=='A'

(After filtering)

(Before filtering)

Filter by the existence or not of comments


FValid(ME.Comments[1])
FValid(ME.Comments[1])

Filter by the existence or not of children objects


FValid(ME.Children[1])
FValid(ME.Child[1])

Order table filter expression

Filter by order type

Manufacturing order Sales order


ME.'Order type'=='M' ME.'Order type'=='S'
ME.Type=='M' ME.Type=='S'

Purchase order Inventory (absolute)

52
Filter expression
ME.'Order type'=='P' ME.'Order type'=='I'
ME.Type=='P' ME.Type=='I'

Inventory (fluctuation)
ME.'Order type'=='J'
ME.Type=='J'

Filter by order class

Replenishment order
ME.'Order class'=='1'
ME.IsReplenishmentOrder=='10'

Registered order (Non-replenishment order)


ME. 'Order class' =='0'
ME.IsReplenishmentOrder=='0'

Purchase items’ replenishment order


ME.Item.'Item type'=='Purchased part'&&ME.'Order class'=='Replenishment order'
ME.Item.Type=='U'&&ME.IsReplenishmentOrder=='1'

Intermediate items’ replenishment order


ME.Item.'Item type'=='Intermediate item'&&ME.'Order class'=='Replenishment order'
ME.Item.Type=='I'&&ME.IsReplenishmentOrder=='1'

Raw materials’ replenishment order


ME.Item.'Item type'=='Raw material'&&ME.'Order class'=='Replenishment order'
ME.Item.Type=='M'&&ME.IsReplenishmentOrder=='1'

Filter by late due date

Late due date order


ME.Lateness>0d
ME.Lateness>0d

Late due date sales order


ME.'Order type'=='Sales order'&&ME.Lateness>0d
ME.Type=='S'&&ME.Lateness>0d

Filter by due date

Orders with current month as due date


GetYearPart(PROJECT.'Project load time')==GetYearPart(ME.LET)&&
GetMonthPart(PROJECT.'Project load time')==GetMonthPart(ME.LET)
GetYearPart(PROJECT.StartupTime)==GetYearPart(ME.LET)&&GetMonthPart(PROJECT.StartupTime)==GetMonthPart(ME.LET)

Orders with due date within next 3 days

53
Filter expression
ME.LET>=StartOfNextDay(PROJECT.'Project load time',0)&&
ME.LET<StartOfNextDay(PROJECT.'Project load time',3)
ME.LET>=StartOfNextDay(PROJECT.StartupTime,0)&&ME.LET<StartOfNextDay(PROJECT.StartupTime,3)

Filter by completed first process orders


ME.Children.Work_Status==’B’
ME.Child.Work_Status==’B’

Filter by orders started 1 month before but didn’t finish yet


ME.'Start time'<PROJECT.'Scheduling basis time'-30d&&ME.'End time'>PROJECT.'Scheduling basis time'
ME.StartTime<PROJECT.BasisTime-30d&&ME.EndTime>PROJECT.BasisTime

Scheduling parameter settings filter orders

Specify the filter condition for Filter orders command

Filter by order quantity 100 or greater


ME.'Order quantity'>=100
ME.Qty>=100

Filter by spec
Order Spec 1 is equal to 'A'
ME. 'Spec 1'=='A'
ME.Spec1=='A'

Order Num spec 1 is 100 or greater


ME.'Num spec 1'>=100
ME.NumSpec1>=100

Order spec 1 is equal to 'A' and order spec 2 is equal to 'B'


ME.'Spec 1'=='A'&&ME.'Spec 2'=='B'
ME.Spec1=='A'&&ME.Spec2=='B'

Order spec 1 is equal to 'A' or 'B'


ME.'Spec 1'=='A'||ME.'Spec 1'=='B'
ME.Spec1=='A'||ME.Spec1=='B'

Order item spec 1 is equal to 'A'


ME.Item.'Spec 1'=='A'
ME.Item.Spec1=='A'

Filter by LET and EST


Order LET (due date) is next month or later
ME.LET>StartOfNextMonth(PROJECT.'Scheduling basis time',1)
ME.LET>StartOfNextMonth(PROJECT.BasisTime,1)

Order EST is a week or more ahead


54
Filter expression
ME.EST>PROJECT.'Scheduling basis time'+1w
ME.EST>PROJECT.BasisTime+1w

Operation table filter expression

Filter by assignment status and resource

Unassigned operations
ME.'Assignment flag'=='Unassigned'
ME.IsAssigned=='0'

Forcibly assigned operations


ME.'Assignment flag'=='Forcibly assigned'
ME.IsAssigned=='3'

(After filter)

(Before filter)

Assigned (dummy resource) operations


ME.'Assignment flag'=='Assigned (dummy resource)'
ME.IsAssigned=='2'

Operations assigned to outsource resource


ME.'Assignment flag'!='Unassigned'&&'Main resource'.'Resource type'=='Outsource resource'
ME.IsAssigned!='0'&&OperationMainRes.Type=='G'
*Preset [outsource resource] (G) to the main resource’s [Resource type] property

Operations assigned to resource A


ME.'Main resource'=='A'&&ME.'Assignment flag'=='Assigned'
ME.OperationMainRes=='A'&&ME.IsAssigned=='1'

Operations assigned to resource group A


ME.'Main resource'.'Resource groups'[1]=='A'&&ME.'Assignment flag'=='Assigned'
ME.OperationMainRes.Group[1]=='A'&&ME.IsAssigned=='1'

Filter by Status

Completed Started
55
Filter expression
ME.Status=='Completed' ME.Status=='Started'
ME. Status =='B' ME. Status =='T'

Frozen Released
ME.Status=='Frozen' ME.Status=='Released'
ME. Status =='D' ME. Status =='I'

Scheduled
ME.Status=='Scheduled'
ME. Status =='A'

Filter by operations with process number 10


ME.'Master operation'.'Process number'==10
ME.Bom.ProcNo==10

Filter by operations with problems

Operations violating EST


ME.Earliness>0
ME.Earliness>0

Operations violating LET


ME.Lateness>0
ME.Lateness>0

Operations with 1 insufficient input quantity instruction or greater


ME.'Number of insufficient input qty instructions'>=1
ME.NumNotFullPeggedInputInstructions>=1

Operations with 1 not fully pegged output instructions or greater


ME.'Number of not fully pegged output instructions'>=1
ME.NumNotFullPeggedOutputInstructions>=1

Operations assigned within 2 days of the assignment period start time


ME.'Production start time'>=StartOfNextDay(PROJECT.'Project load time',0)&&
ME.'Production start time'<StartOfNextDay(PROJECT.'Project load time',2)&&
ME.Status!='Completed'&&ME.'Assignment flag'=='Assigned'
ME.OperationProductionStartTime>=StartOfNextDay(PROJECT.StartupTime,0)&&
ME.OperationProductionStartTime<StartOfNextDay(PROJECT.StartupTime,2)&&ME.Status!='B'&&ME.IsAssigned=='1'

Operations with valid user specified quantity


!FValid(ME.'User specified quantity')
!FValid(ME.UOperationOutMainItemQty)

Scheduling parameter settings filter operations

Specify filter expression to filter operations command

56
Filter expression

Filter by operations assigned to main resource A


ME.'Main resource'=='A'
ME.OperationMainRes=='A'

Filter by process
Operations with process number 10
ME.'Master operation'.'Process number'==10
ME.Bom.ProcNo==10

Operations with process code A


ME.'Master operation'.Process=='A'
ME.Bom.Proc=='A'

Filter by assignment time


Operations’ production task assigned within 10 days of the assignment period start time
ME.'Production start time'<PROJECT.'Scheduling basis time'+10d
ME.OperationProductionStartTime<PROJECT.BasisTime+10d

Operations’ production task or setup task assigned within 10 days of the assignment period start time
ME.'Start time'<PROJECT.'Scheduling basis time'+10d
ME.StartTime<PROJECT.BasisTime+10d

Integrated master editor table filter expression

Filter by instruction type

Input instruction
ME.'Instruction type'=='Input instruction'
ME.InstructionType=='I'

Output instruction
ME.'Instruction type'=='Output instruction'
ME.InstructionType=='O'

Use instruction
ME.'Instruction type'=='Use instruction'
ME.InstructionType=='U'

Filter by excluding instructions auto-generated for intermediate items

Take advantage to the fact that auto-generated instruction codes are In0, Out0.
ME.'Instruction code'!='In0'&&ME.'Instruction code'!='Out0'
ME.Instruction!='In0'&&ME.Instruction!='Out0'

57
Filter expression
Filter by final items with first letter A
Left(ME.'Final item',1)==’A’
Left(ME.FinalItem,1)==’A’

Filter by finished item flag.


ME.'Final item'.'Item type'=='Finished item'
ME.FinalItem.Type=='P'

Resource table filter expression

Filter by resource type

Main resource Sub resource


ME.'Resource type'=='Main resource' ME.'Resource type'=='Sub resource'
ME. Type=='M' ME. Type=='S'

Outsource resource Inventory


ME.'Resource type'=='Outsource resource' ME.'Resource type'=='Inventory'
ME. Type=='G' ME. Type=='I'

Customer
ME.'Resource type'=='Customer'
ME. Type=='C'

Filter by resource group

Use the fact that when resource is changed to resource group, values are added to [Group members] property
FValid(ME.'Group members')
FValid(ME.GroupContents)

Other than resource group


!FValid(ME.'Group members')
!FValid(ME.GroupContents)

Filter by furnace resource


Left(ME.'Resource class',1)=='F'
Left(ME.ResClass,1)=='F'

Item table filter expression

Filter by item type

Finished item Intermediate item

58
Filter expression
ME.'Item type'=='Finished item' ME.'Item type'=='Intermediate item'
ME. Type=='P' ME. Type=='I'

Manufactured parts Raw materials


ME.'Item type'=='Manufactured parts' ME.'Item type'=='Raw materials'
ME. Type==’H’ ME. Type=='M'

Filter by spec and num spec

Item spec 1 is 'A'


ME.'Spec 1'=='A'
ME.Spec1=='A'

Item num spec 1 is 100 or greater


ME.'Num spec 1'>=100
ME.NumSpec1>=100

Filter by other than auto-generated intermediate items


ME.'Auto-generated intermediate item flag'==0
ME.IsAutoGeneratedIntermediateItem==0

(After filter)

(Before filter)

59
Sort expression
10.Sort expression

Specify the value to be evaluated for sorting in ascending or descending order.


The main properties are:
1. Sort expression on table window
2. Dispatching key on scheduling parameter settings

Dispatching key on scheduling parameter settings

Dispatching key ME operation


(scheduling parameter settings-[General] tab) OTHER not specified
HOLDER not specified

Sort by order’s property

Order priority
ME.Order.Priority
ME.Order.Priority

Order due date


ME.Order.LET
ME.Order.LET

Order code
ME.Order.Code
ME.Order.Code

Sort by operation’s property

Operation production start time (date from the previous assignment)


ME.'Production start time'
ME.OperationProductionStartTime

Last dispatching order


ME.'Last dispatching order'
ME.LastAssignmentOrder

Order code
ME.Order.Code
ME.Order.Code

Sort by spec

Spec1 code
GetApplicableSpec(1,ME)
GetApplicableSpec(1,ME)

Num spec 1
60
Sort expression
GetApplicableNumSpec(1,ME)
GetApplicableNumSpec(1,ME)

Sort by sales order due date

Sort by pegged sales order due date


ME.'Order '.'Right sales order earliest due date'
ME.Order.SalesOrderPeggingLET

Sort by the earliest due date of pegged orders.


ME.'Order '.'Right order earliest LET'
ME.Order.RightOrderEarliestPeggingLET

61
Integrated master: capacity
11.Integrated master: capacity

Resource capacity is specified using expressions. Furthermore, the rate between input and output qty of the process is also
specified by expressions.

Specify resource capacity

Setup(Integrated master editor table) ME Operation


Production(Integrated master editor table) OTHER Resource
Teardown(Integrated master editor table) HOLDER Master use instruction
(Integrated master editor table)

Specify resource capacity

Specify quantity per unit of time

10 pieces per minute


10pm

Specify time needed to make one piece

10 minutes per piece


10mp

Specify fixed time

10minutes. Default unit is evaluated as minute.


10

10 seconds
10s

10 hours
10h

10 days
10d

10 weeks
10w

62
Integrated master: capacity

Specify complex formulas

5 minutes + 2 minutes per piece


5m+2mp

If operation’s Production qty is less than 100, it takes 10 minutes, otherwise it will take 20 minutes
IF(ME.'Production quantity'<=100,10m,20m)
IF(ME.OperationOutMainItemQty<=100,10m,20m)

Specify In/Out rate in the process

Setup(Integrated master editor table) ME Operation


Production(Integrated master editor table) OTHER Resource
Teardown(Integrated master editor table) HOLDER Master input instruction/ Master output instruction
(Integrated master editor table)

The rate between Production qty (operation’s Production qty) and Input qty (input instruction’s Quantity) is specified in to
Master input instruction. The rate between Output qty (Master output qty) and the Production qty (operation’s Production qty)
is specified in to Master output instruction.

Specify fixed In/Out rate

For each 1 unit of production qty, 0.5 units of materials are supplied
0.5

For each 1 unit of production qty, 2 units of materials are supplied


2

63
Quantity formula
12.Quantity formula

Write expressions to return real numbers and specify them on quantity formulas.

Standard expression

Production qty formula(Master input instruction) ME Input instruction


OTHER Not specified
HOLDER Master input instruction

Expression to specify Yield rate and Scrap qty


(ME.Quantity*ME.'Master input instruction'.'Yield rate'-ME.'Master input instruction'.'Scrap quantity')/ME.'Master input
instruction'.'Required quantity'
(ME.Qty*ME.InputBomInst.Yield-ME.InputBomInst.Scrap)/ME.InputBomInst.InOutRate

Input qty formulaMaster input instruction) ME Input instruction


OTHER Not specified
HOLDER Master input instruction

Expression to specify Yield rate and Scrap qty


(ME.'Order/operation/task'.'Production quantity'*ME.'Master input instruction'.'Required quantity'+ME.'Master input
instruction'.'Scrap quantity')/ME.'Master input instruction'.'Yield rate'
(ME.Work.OperationOutMainItemQty*ME.InputBomInst.InOutRate+ME.InputBomInst.Scrap)/ME.InputBomInst.Yield

Production qty formula(Master output instruction) ME Master output instruction


OTHER Not specified
HOLDER Master output instruction

Expression to specify Yield rate and Scrap qty


(ME.Quantity/ME.'Master output instruction'.'Yield rate'+ME.'Master output instruction'.'Scrap quantity')/ME.'Master
output instruction'.'Required quantity'
(ME.Qty/ME.OutputBomInst.Yield+ME.OutputBomInst.Scrap)/ME.OutputBomInst.InOutRate

Output qty formula(Master output instruction) ME Master output instruction


OTHER Not specified
HOLDER Master output instruction

Expression to specify Yield rate and Scrap qty


(ME.'Order/operation/task'.'Production quantity'*ME.'Master output instruction'.'Required quantity'-ME.'Master output
instruction'.'Scrap quantity')*ME.'Master output instruction'.'Yield rate'
(ME.Work.OperationOutMainItemQty*ME.OutputBomInst.InOutRate-ME.OutputBomInst.Scrap)*ME.OutputBomInst.Yield

Rounding floating point numbers

64
Quantity formula
When you consider the yield rate in the quantity calculation, it results in a real number with floating points. You can round the
calculated number using internal functions such as Roundup and Truncate. Yield rate is specified in to Master output instruction
and the following two expressions could be used.

Production qty formula (Master output instruction)


Roundup((ME.Quantity/ME.'Master output instruction'.'Yield rate'+ME.'Master output instruction'.'Scrap
quantity')/ME.'Master output instruction'.'Required quantity'),0)
Roundup((ME.Qty/ME.OutputBomInst.Yield+ME.OutputBomInst.Scrap)/ME.OutputBomInst.InOutRate),0)

Output qty formula (Master output instruction)


Truncate((ME.'Order/operation/task'.'Production quantity'*ME.'Master output instruction'.'Required
quantity'-ME.'Master output instruction'.'Scrap quantity')*ME.'Master output instruction'.'Yield rate',0)
Truncate((ME.Work.OperationOutMainItemQty*ME.OutputBomInst.InOutRate-ME.OutputBomInst.Scrap)*ME.OutputBomInst.Yield),0)

[Production qty formula] is rounded up because it is used when calculating the material qty from the order qty. On another hand,
[Output qty formula] is truncated because it is used to calculate the later processes based on reported qty.

65
Scheduling parameter (Weight customization)
13.Scheduling parameter

Weight customization

Additional evaluation expression (Resource evaluation) ME Resource evaluation


(Scheduling parameter settings-Resource evaluation-[General] tab OTHER Not specified
HOLDER Resource evaluation

If LET is not met, assign to backup resource

If LET is not met, assign to backup resource


IF(ME.'During evaluation - target operation'.'Order '.LET<ME.'During evaluation - production task time
series'[0],If(ME.'Target resources'.'Backup Flag'=='Yes',10000,0),10000)
If(ME.TentAssignCurrOper.Order.LET<ME.TentAssignProdTimeSeries[1],If(ME.TentAssignCurrRes.BackupFlag=='Yes',10000,0),10000)

Using normal weight, all the operations are assigned to the non-backup resource (late operations are represented by red color,
otherwise by green color)

Cut

Assy

Assy(backu

Inspection

Using the expression above, the late operations (red color bars) are assigned to the backup resource.

Cut

Assy

Assy(backu

Inspection

If assigned to next month of sales order’s LET to which it is pegged, assign to backup resource.

66
Scheduling parameter (Weight customization)
If(StartOfNextMonth(ME.'During evaluation - target operation'.'Order'.'Right sales order earliest due
date',1)<ME.'During evaluation - production task time series'[1],If(ME.'During evaluation - target resource'. 'Backup
Flag'=='Yes',10000,0),10000)
If(StartOfNextMonth(ME.TentAssignCurrOper.Order.SalesOrderPeggingLET,1)<ME.TentAssignProdTimeSeries[1],If(ME.TentAssignCurrRes.Backu
pFlag=='Yes',10000,0),10000)

[Backup Flag] is user property added to resource class. The number 10000 in the expression above could be any weight and
adjustable.

Use resource priority, as long as LET is met

If LET is not met, assign to backup resource


IF(ME.'During evaluation - target operation'.'Order '.LET<ME.'During evaluation - production task time
series'[0],0,NormalizeAscend(ME.'During evaluation - master use instruction'.'Resource priority'))
If(ME.TentAssignProdTimeSeries[0]<ME.TentAssignCurrOper.Order.LET,ME.TentAssignCurrUseBomInst.ResourcePriority,0)

Sequence control settings

Evaluation expression(Sequence control evaluation ME Assignment evaluation


keys) OTHER Not specified
(Scheduling parameter settings-[Optimization] tab-Sequence control HOLDER Sequence control evaluation key
evaluation rules-Sequence control evaluation key-Evaluation
expression-[General] tab)

Same item (Evaluation expression sub key: TRUE)


ME.'During evaluation - target operation'.'Main output item'==ME.'During evaluation - left operation'.'Main output item'
ME.TentAssignOperation.OperationOutMainItem==ME.TentAssignLeftOper.OperationOutMainItem

Change the spec. But if previous operation production time is less than 12 hours, keep the same spec (Evaluation
expression sub key: TRUE)
(ME.'During evaluation - left operation'.'Production time'<12h&&ME.'During evaluation - left operation'.'Order
'.Item.'Spec 2'==ME.'During evaluation - target operation'.'Order '.Item.'Spec 2')||ME.'During evaluation - left
operation'.'Order '.Item.'Spec 2'!=ME.'During evaluation - target operation'.'Order '.Item.'Spec 2'
(ME.TentAssignLeftOper.OperationProductionTime<12h&&ME.TentAssignLeftOper.Order.Item.Spec2==ME.TentAssignOperation.Order.Item.Spec
2)||ME.TentAssignLeftOper.Order.Item.Spec2!=ME.TentAssignOperation.Order.Item.Spec2

Spec priority (Evaluation expression sub key: Ascending)


ME.'During evaluation - target operation'.'Order '.Item.'Spec 1'.Priority
ME.TentAssignOperation.Order.Item.Spec1.Priority
Need to add new property called [Priority] of type “Float” to Spec1

67
Scheduling parameter (Weight customization)
Must follow spec priority sequence (Evaluation expression sub key: TRUE)
IF(FValid(ME.'During evaluation - left operation'.'Order '.Item.'Spec 1'.MustCombination),Find(ME.'During evaluation
- left operation'.'Order '.Item.'Spec 1'.MustCombination,ME.'During evaluation - target operation'.'Order '.Item.'Spec
1'.'Spec code'),FALSE)
IF(FValid(ME.TentAssignLeftOper.Order.Item.Spec1.MustCombination),Find(ME.TentAssignLeftOper.Order.Item.Spec1.MustCombination,ME.Tent
AssignOperation.Order.Item.Spec1.Code),FALSE)
Add a new multidata property called [MustCombination] to Spec1 table and specify the sequence in which to assign. If it is the
right sequence, it returns TRUE, otherwise it returns FALSE.

Minimal setup time (if setup time is within 1 day, set it to 0) (Evaluation expression sub key: Smaller)
IF(1d<ME.'During evaluation - setup time',ME.'During evaluation - setup time',0s)
IF(1d<ME.TentAssignSetupTime,ME.TentAssignSetupTime,0s)

Due date period grouping (Evaluation expression sub key: Smaller, Evaluation expression threshold: 3d)
ME.'During evaluation - target operation'.'Order '.'Right order earliest LET'
ME.TentAssignOperation.Order.RightOrderEarliestPeggingLET

68
QA list
14.QA list

The most frequently asked question addressed to us is listed below, with its answers.
You can find newer QA in our web page.

1.Determining if the resource to where the previous operation is assigned is outsource resource.
Q:How to determine if the resource to where the previous operation is assigned is outsource resource.

A:Specify the following expression


ME.Operation.’Previous process operations’[1].’Assignment flag’!=’Unassgined’&&ME.Operation.’Previous process
operations’[1].’Main resource’.’Resource type’==’Outsource resource’
ME.Operation.PrevOperation[1].IsAssigned!='0'&&ME.Operation.PrevOperation[1].OperationMainRes.Type=='G'
*ME represents use instruction
Meaning: if the previous operation is not unassigned and the assigned main resource type is outsource resource. This expression
works when there is only one previous process, but if you have merging from multiple processes, you’ll have to make
adaptations to the expression.

2.Switching the master data version

Q:How to specify the master valid period time and switch it.

A:Add one new property to the order class and specify the value of version there.
(Suppose the new property is MasterVersion). For example:
If the property value type is “string”, you specify: 'A-version', 'B-version',
If the property value type is “integer”, you specify: 1, 2, 3,
If the property value type is “date”, you specify: #2006/2/16#
In the integrated Master Editor, you specify the expression in the “process selector valid condition” or “Valid condition”:
① ME.MasterVersion=='A-version'
② ME.MasterVersion<= 2
③ ME.MasterVersion<=Now()
* ME represents order.
The meaning of each one of expression above is:
① If the order version is “A-version”
② If the order version is lower or equal than 2
③ If the order version is older than the present date/time

3.Pegging orders with the same flag settings

Q:How to peg orders with the same flag settings.

A:Use the property called [Pegging condition] in the item class.


Suppose, for example, that the flag in the order is called [Order_PeggingFlag] property.
Specify [Pegging Condition] expression as below and the pegging is done only when [Order_PeggingFlag] has the same value.
ME.Order.PeggingFlag ==OTHER.Order.PeggingFlag
ME.Order.PeggingFlag==OTHER.Order.PeggingFlag
Property such as [Spec1] could be used in the place of new property [Order_PeggingFlag]. In this case, the expression becomes:
ME.Order.’Spec 1’ ==OTHER.Order.’Spec 1’
ME.Order.Spec1==OTHER.Order.Spec1
The reserved word “OTHER” can be used in [Pegging condition] property.
*ME represents output instruction and OTHER represents Input instruction

69
QA list

4.Get the operation process code from use instruction

Q:I’m exporting the [use instruction] data as output of scheduling. How to export the [Process code] specified in the Integrated
Master Editor to the [use instruction] output.

A:Add a new property of “String” type to the “use instruction” class, and specify the expression below as “virtual property
expression”:
ME.Operation.’Master operation’.Process
ME.Operation.Bom.Proc
*ME represents use instruction
With this expression you specify one property that obtains the operation’s process from use instruction.
Meaning: Obtain the code from “use instruction” -> “Operation” -> “Master operation” -> “Process”
You will be able to export this property with Field mapping it in the “Data I/O settings”.

5.Show the process code of order’s last process

Q:How to show the process code of order’s last process

A:Add a new property of “String” type to the order class, and specify the expression below as “virtual property expression”:
ME.Children[0].Work_Bom.Process
ME.Child[0].Work_Bom.Proc
*ME represents order
Specifying “0” as the index of the array returns the last element of the array.
The last child means the operation of the last process.
This expression obtains the Bom from its child (operation) and from it, obtains the process. It will not work if the order is not
yet exploded. To obtain the last process’s code even before the order explosion, you should specify the expression below.
IF(Fvalid(ME.Children[0]),ME.Children[0].Work_Bom.Process,ME.Item.Children[0].Bom_Proc)
IF(FValid(ME.Child[0]),ME.Child[0].Bom.Proc,ME.Item.Child[0].Bom_Proc)
Its meaning is: If the child (operation) exists, then operation -> bom -> process, otherwise item -> bom (child) -> process. You
will be able to obtain the process whatever the order is exploded or not.
The expression below is also valid in most of cases, but if you specify process selector, you will not be able to obtain the last
process of the process selector used. Furthermore, if you use “Item for order explosion” property to explode the order, this
expression won’t be able to handle it, and the reason to obtain the process from the operation’s bom.
ME.Item.Children[0].Bom_Proc
ME.Item.Child[0].Bom_Proc

6.Verify the existence of Process selector

Q:How to verify the existence of Process selector

A:If the expression below returns TRUE, the process selector exists; otherwise the process selector does not exist.
ME.Children[0].Bom_Type==’Process selector’
ME.Child[0].Bom_Type=='C'
*ME represents item.
The meaning of this expression is: if the type of child of item (could be Process selector or bom) is process selector(‘C’), the
evaluates to TRUE, otherwise it evaluates to FALSE.

70
QA list
7.Verify which process selector the order explosion used

Q:How to verify which process selector the order explosion used.

A:Add one new “String” type property to the order class and in its virtual property expression, specify the following
expression.
ME.Children[0].Work_Bom.Parent
ME.Child[0].Work_Bom.Parent

“ME” means order. The meaning of this expression is: from the order, get the operation (child) -> master operation. The parent
object of master operation is the process selector.
As the operation has the reference to the master operation of the process selector used, you can always get the process selector
from the master operation.
If the operation doesn’t exist, the expression above will fail to evaluate and one empty string will be returned.
The expression above is valid if all the items have process selector, but if not it will return the item code (the parent of master
operation is item if process selector doesn’t exist).
The hierarchy is:
<<Process selector is not defined>>
Item-Master operation
<<Process selector is defined>>
Item-Process selector-Master operation

Specifying the expression below should be able to handle both cases.


IF(ME.Children[0].Work_Bom.Parent.'Class definition'=='Bom',
ME.Children[0].Work_Bom.Parent,'Process selector not specified')
IF(ME.Child[0].Work_Bom.Parent.ClassDef=='Bom',ME.Child[0].Work_Bom.Parent,'Process selector not specified')
The meaning of this expression is: If the object returned by the parent of Master operation is of ‘Bom’ class, return its name,
otherwise return ‘Process selector not specified’.

8.Verify if one property exists or not

Q:How to verify if order’s spec property or some property of operation exist or not

A:Use the FValid internal function


For example, verifying if order has children is enough to verify the existence of operation.
FValid(ME.Children[0]),
Fvalid(ME.Child[0])
*ME represents order.
If the operation exists, it returns TRUE, otherwise it returns FALSE.
# Child is a multidata. Therefore you set the index. Zero points to the last element.
# You could set the index to 1 to get the same results
The same could be applied for specs
FValid(ME.’Spec 1‘)
Fvalid(ME.Spec1)
*Me represents order

9.Show the result quantity of previous process

Q:How to specify the virtual property expression to show the result quantity of previous process in an operation table which
style is specified to filter some processes.

A:Is the new user property already specified?


The data type should be “Float”, and the expression should be as follows.
71
QA list
ME.'Previous process operations'[1].'Reported qty'
ME.PrevOperation[1].ResultQty
[Previous process operations] is multidata type and the index [1] represents the first element. If it is not a merging process
index [1] should suffice; otherwise index of [2] may need to be specified. Furthermore, if you want to edit the newly added
property, you will have to specify [Virtual property inverse expression]. If you don’t specify this property, your newly added
property will be a read only property. If you are using older version of Asprova, you will not be able to see [Virtual property
inverse expression] property.
HOLDER.PrevOperation[1].ResultQty=FindNumberL(INPUT,1)
HOLDER.PrevOperation[1].ResultQty=FindNumberL(INPUT,1)
This expression takes the number from the string input and assigning it the previous operations’ reported qty property.

10.Properties after you specify Child

Q:Is it correct to specify properties that don’t show up in the intellisense? I’m using the Master input instruction’s [Valid
condition] on integrated master editor table. The expression is specified as ME.Child[1].StartTime (operation star time) but
[StartTime] doesn’t appear in the list of choices for [Child[1].], although it is evaluated correctly.

A:The expression below is correct, but it is strongly suggested that you specify the property code.
ME.Child[1].StartTime
The property code for Operation [Start time] is Work_StartTime. (StartTime only is called short name)
If you specify ME.Child[1] it is not possible to determine the class to which the next object belongs to and the intellisense will
show the properties for the normal object only. If you know the class type is Work, you should specify the following expression.
ME.Child[1].Work_StartTime
Perhaps short name format evaluates correctly but after you save and reload it, it could not be evaluated correctly. The property
code is obtained from the [Code] property on property definition class.

11.How to improve resource filling rate specifying resource evaluation’s Additional evaluation expression

Q:How to express the following situation using ’Resource evaluation’.’ Additional evaluation expression’ property.

【What to express】
If the usable resource quantity in the time period defined by ‘Production start time’ and ‘Production end time’ for the resource
evaluation is greater than 1, it will set to 1; otherwise it will set to 0.

【Motivation】
I want to increase the filling rate when assigning operations to multiple candidates of furnace resource. If I can specify resource
evaluation as above, it will increase the waiting time for the production but with increased resource filling rate.
A:
Specify the expression as follows.
IF(1==ResourceLoad(ME.'During evaluation - target resource',
ME.'During evaluation - production task time series'[1],
ME.'During evaluation - production task time series'[0]),0,1)
IF(1==ResourceLoad(ME.TentAssignCurrRes,ME.TentAssignProdTimeSeries[1],ME.TentAssignProdTimeSeries[0]),0,1)
ResourceLoad is internal function and its return value approaches 1 if there is no operation and 0 otherwise.

72
Expression Type Properties by class
15.Expression Type Properties by class

Project
Scheduling basis time Theoretical inventory calculation time Operation code expression
Assignment start time Operation property assign expressions Replenishment manufacturing order code
Assignment end time Split child operation property assign expressions expression
Display start time Replenishment manufacturing order propertyReplenishment purchase order code
Display end time assign expressions expression
Freeze period end time Replenishment purchase order property assignAuto-generated one-to-one order code
Instruction output period end expressions expression
time One to one pegged order property assign Event order code expression
expressions Auto-generated intermediate item code
expression
Theoretical inventory code expression

Order
Inventory valid period

Item
Pegging condition Inventory valid period

Master operation
Process selector valid Task selector valid condition
condition

Master input instruction


Valid condition

Master output instruction


Valid condition

Master use instruction


Valid condition

Resource
Valid condition Furnace valid condition (Setup) Furnace valid condition (Teardown)
Furnace valid condition

Data I/O
Import property conversion Export property conversion expression
expression

73
Expression Type Properties by class

Resource evaluation
Additional evaluation expression

Modify properties
Order expression Operation expression

Resource Gantt chart


Bar color expression Use instruction bar text expression Operation left part text expression
Bar flag color expression Use instruction data tip text expression Task left part text expression
Use instruction bar text color Use instruction status bar text expression
expression

Order Gantt chart


Order bar inside text color Order bar right text expression Operation data tip text expression
expression Order left part text expression Operation status bar text expression
Order bar right text color expression Order data tip text expression Task bar inside text expression
Operation bar inside text color Order status bar text expression Task bar right text expression
expression Operation bar inside text expression Task left part text expression
Operation bar right text color Operation bar right text expression Task data tip text expression
expression Operation left part text expression Task status bar text expression
Task bar inside text color expression
Task bar right text color expression
Order bar inside text expression

Inventory graph
Number format

Property definition
Background color expression Virtual property expression Display expression
Text color expression

74
Internal function
16.Internal Function

String operations
Find( str, strSearch )
Arguments str Source string.
strSearch Searched string.
Return value Find the strSearch from str. In case that it is found, return TRUE, or else return FALSE.
Example Find('abcde', 'bc') -> TRUE
Find('abcde', 'xy') -> FALSE

StrStr( str, strSearch )


Arguments str Source string.
strSearch Searched string.
Return value Find the first place of str from strSearch. In case that it is found, return the place, or else return 0.
Example StrStr('abcdefghijklmn', 'fgh') -> 6
StrStr('abcdefghijklmn', 'xyz') -> 0

Left( str, length )


Arguments str Source string.
length Integer. The character number of the get string.
Return value Return length charaters of source string from the most left.
Example Left('abcde',3) -> 'abc'
Remarks Return 3 charaters of "abcde" from the most left.

LeftB( str, length, flag )


Arguments str Source string.
length Integer. The character number of the get string.
flag 0 ... In the case that Multiple byte string have to be cut, then cut it.
1 ... In the case that Multiple byte string have to be cut, then replenish not enough
bytes.
Return value Return length charaters of source string from the most left.
Example

Remarks It is different with Left function when there are multiple bytes characters, such as Japanese characters in
above sample. One Japanese character occupies two bytes.

Right( str, length )


Arguments str Source string.
length Integer. The character number of the get string.。
Return value Return length charaters of source string from the most right.
Example Right('abcde',3) -> 'cde'
Remarks Return 3 charaters of "abcde" from the most right.

75
Internal function
RightB( str, length, flag )
Arguments str Source string.
length Integer. The byte number of the get string.
flag 0 ... In the case that Multiple byte string have to be cut, then cut it.
1 ... In the case that Multiple byte string have to be cut, then replenish not enough
bytes.
Return value Return length charaters of source string from the most right.
Example

Remarks It is different with Right function when there are multiple bytes characters, such as Japanese characters
in above sample. One Japanese character occupies two bytes.

Len( str )
Arguments str Source string.
Return value Return the character number of source string.
Example Len('abcdefghijklmn') -> 14

LenB( str )
Arguments str Source string.
Return value Return the byte number of source string.
Example

Remarks It is different with Len function when there are multiple bytes characters, such as Japanese characters in
above sample. One Japanese character occupies two bytes.

Mid( str, start, length )


Arguments str Source string
start The most left position of argument str is 1. It's is specified as the start position to get
the substring from str. In the case that start vlaue is bigger than the character number
of str, return "" (null string). The minumum value of start is 1.
length Integer, the character number of get stirng.
Return value Return the length characters from the start position from str string.
Example Mid('abcde',2,3) -> 'bcd'
Remarks Return 2 characters from 3 position from "abcde" string.

GenStrSerialNum ( serialNum length )


Arguments serialNum Serial number.
length Digital number of serial number
Return value Return serialNum filled with zero as a string with length digits.
Example GenStrSerialNum( 5, 3 ) -> ‘005’

76
Internal function
Cast Date/Time/Number to String
Format( value, expr )
Arguments value Translated Data/Time/Number.
expr Specify the string format. Same with VisualBasic Format function.
Return value Format value based on specified format string expr.
Example Take ME.StartTime=2011/1/27 17:04:23 for example.
Format(ME.StartTime, "h:m:s") -> '5:4:23'
Format(ME.StartTime, "hh:mm:ss tt") -> '05:04:23 PM'
Format(ME.StartTime, "dddd, MMM d yyyy") -> 'Thursday, Jan 27 2011'
Format(ME.StartTime, "HH:mm:ss") -> '17:04:23'

Format(5459.4, "##,##0.00") -> '5,459.40'


Format(334.9, "###0.00") -> '334.90'
Format(5, "0.00%") -> '500.00%'
Remarks Because " character cannot be used in specified string expr, if you want to use " character, please
surround it with {}. Number format cannot be used.

Cast String to Number


FindNumberL( str, count )
Arguments str Source string.
count Integer. Specify the number of get string from the most left.
Return value Return finded number of str string from the most left.
Example FindNumberL('Year:2011 Month6 Day1',1 ) -> 2011
FindNumberL('Year:2011 Month6 Day1',2 ) -> 6
FindNumberL('Year:2011 Month6 Day1',3 ) -> 1

FindNumberR( str, count )


Arguments str Source string
count Integer. Spcify the number of get string from the most right.
Return value Return count number fo str from the most right.
Example FindNumberR( 'Year2011 Month6 Day1',1 ) -> 1
FindNumberR( 'Year2011 Month6 Day1',2 ) -> 6
FindNumberR( 'Year2011 Month6 Day1',3 ) -> 2011

Cast Date to Integer


GetYearPart( time )
Arguments time Target time.
Return value Return the year of the time.
Example GetYearPart( #2011/6/1 12:00:00# ) -> 2011

GetMonthPart( time )
Arguments time Target time.
Return value Return the month of the time as an integer.
Example GetMonthPart( #2011/6/1 12:30:00# ) -> 6

77
Internal function
GetDayPart( time )
Arguments time Target time.
Return value Return the date of the time as an integer.
Example GetDayPart( #2011/6/1 12:30:00# ) -> 1

GetHourPart( time )
Arguments time Target time.
Return value Return the hour of the time as an integer.
Example GetHourPart( #2011/6/1 12:30:00# ) -> 12

GetMinutePart( time )
Arguments time Target time.
Return value Return the second of the time as an integer.
Example GetMinutePart( #2011/6/1 12:30:00# ) -> 30

GetSecondPart( time )
Arguments time Target time.
Return value Return the time(Not enough 24 hours) of the time.
Example GetSecondPart( #2011/6/1 12:30:00# ) -> 0

Cast Date toTime


GetTimePart( time )
Arguments time Target date.
Return value Return the time(Not enough 24 hours) of the time.
Example GetTimePart( #2011/6/1 12:30:00# ) -> 12H30M
GetTimePart( Now() ) -> Now time

Cast Time to Time


ConvertTime( time, unit )
Arguments time Target time.
unit Format unit(m, M, h, H, d, D). Round down the time in case of lowercase character.
Round up the time in case of uppercase character. m - minute, h - hour, d - date.
Return value Return the time with specified time unit.
Example ConvertTime( 350s, 'm' ) -> 5 350 seconds equals 5 minutes 50 seconds, round down the second part and
return 5 minutes.
ConvertTime( 350s, 'M' ) -> 6 350 seconds equals 5 minutes 50 seconds, round up the second part and
return 6 minutes.
ConvertTime( 1.6H, 'H' ) -> 2 Round up 1.6 hour and return 2 hours.

78
Internal function
Cast Integer to Date
DateF( year, month, day, hour, minute, second )
Arguments year Integer. Year.
month Integer. Month.
day Integer. Day.
hour Integer. Hour.
minute Integer. Minute.
second Integer. Second.
Return value Return specified Year/Month/Day/Hour/Minute/Second.
Example DateF( 2011, 6, 15, 6, 30, 30 ) -> 2011/06/15 06:30:30
Remarks 'F' of DateF is the 'F' of Full, which means all(Year/Month/Day/Hour/Minute/Second) can be specified.

DateS( year, month, day )


Arguments year Integer. Year.
month Integer. Month.
day Integer. Day.
Return value Return specified Year/Month/Day. It's not relationship with "Day demarcation time" of "Time periods"
tab of Project settings dialog.
Example DateS( 2011, 6, 15 ) -> 2011/06/15
Remarks S' of DateS is 'S' of Simple, which mean only specify Year/Month/Day.

DateT( year, month, day, time )


Arguments year Integer. Year.
month Integer. Month.
day Integer. Day.
time Time.
Return value Return Year/Month/day of th time.
Example DateT( 2011, 6, 15, 6H ) -> 2011/06/15 06:00:00
DateT( 2011, 6, 15, 6M) -> 2011/06/15 00:06:00
DateT( 2011, 6, 15, 6S ) -> 2011/06/15 00:00:06
Remarks 'T' of DateT is 'T' of TimeSpan.
One of time unit, such as H, M and S, can be specified.

Cast String to Number


CDblFromStr( str )
Arguments str String.
Return value Return the str as a number.
Example CDblFromStr('1.5') -> 1.5
Remarks Plugin extension is nesseary.

79
Internal function

Cast String to Integer


CLngFromStr( str )
Arguments str String.
Return value Format str as number. The number after decimal point is turncated by rounding rule that return 0 in case
that the number is less than 5 and return 1 in case that the number is bigger than 5(contain equal).
Example CLngFromStr('1.5') -> 2
Remarks Plugin extension is nesseary.
Cast Number to String
CStrFromDbl( value )
Arguments value Number.
Return value Return the value as a string.
Example CStrFromDbl(1.5) -> '1.5'
Remarks Plugin extension is nesseary.

Cast Number to Integer


CLngFromDbl( value )
Arguments value Number.
Return value The number after decimal point is turncated by rounding rule that return 0 in case that the number is less
than 5 and return 1 in case that the number is bigger than 5(contain equal).
Example CLngFromDbl(1.5) -> 2
Remarks Plugin extension is nesseary.

Time Series/Time
Now()
Arguments None.
Return value Return now date of computer.
Example Now() -> #2011/06/27 10:30:00#

StartOfNextDay( time, day )


Arguments time Base time.
day Integer. Added days.
Return value Return the start time after added days based on the time.
Example StartOfNextDay(#2011/4/2#,1) -> #2011/4/3 00:00:00# Start time of tomorrow.
StartOfNextDay(#2011/4/2#,0) -> #2011/4/2 00:00:00# Start time of today.
StartOfNextDay(#2011/4/2#,-1) -> #2011/4/1 00:00:00# Start time of yesterday.

In case that "Day demarcation time" of project settings is 08:00:00, start time will be "Day demarcation
time".
StartOfNextDay(#2011/4/2#,1) -> #2011/4/3 08:00:00#

80
Internal function

StartOfNextWeek( time, week )


Arguments time Base time.
week Integer. Added weeks.
Return value Return the start time(Monday) after added weeks based on the time.
Example StartOfNextWeek(#2011/4/2#,1) -> #2011/4/4 00:00:00# Start time of next week.
StartOfNextWeek(#2011/4/2#,0) -> #2011/3/28 00:00:00# Start time of this week.
StartOfNextWeek(#2011/4/2#,-1) -> #2011/3/21 00:00:00# Start time of last week.

In case that "Day demarcation time" of project settings is 08:00:00, start time will be "Day demarcation
time".
StartOfNextWeek(#2011/4/2#,1) -> #2011/4/4 08:00:00# StartOfNextWeek(#2011/4/2#,1) ⇒ #2011/4/4
08:00:00#

StartOfNextMonth( time, month )


Arguments time Base time.
month Integer. Added monthes.
Return value Return the start time(Sunday) after added monthes based on the time.
Example StartOfNextMonth(#2011/4/10#,1) -> #2011/5/1 00:00:00# Start time of next month.
StartOfNextMonth(#2011/4/10#,0) -> #2011/4/1 00:00:00# Start time of this month.
StartOfNextMonth(#2011/4/10#,-1) -> #2011/3/1 00:00:00# Start time of last month.

In case that "Day demarcation time" of project settings is 08:00:00, start time will be "Day demarcation
time".
StartOfNextMonth(#2011/4/10#,1) -> #2011/5/1 08:00:00#

EndOfNextDay( time, day )


Arguments time Base time.
day Integer. Added days.
Return value Return the end time after added days based on the time.
Example EndOfNextDay(#2011/4/2#,1) -> #2011/4/3 23:59:59# End time of tomorrow.
EndOfNextDay(#2011/4/2#,0) -> #2011/4/2 23:59:59# End time of today.
EndOfNextDay(#2011/4/2#,-1) -> #2011/4/1 23:59:59# End time of yesterday.

In case that "Day demarcation time" of project settings is 08:00:00, start time will be "Day demarcation
time".
EndOfNextDay(#2011/4/2#,1) -> #2011/4/4 07:59:59# End time of tomorrow.

EndOfNextWeek( time, week )


Arguments time Base time.
week Integer. Added weeks.
Return value Return the end time(Sunday) after added weeks based on the time.
Example EndOfNextWeek(#2011/4/2#,1) -> #2011/04/10 23:59:59# End time of next week
EndOfNextWeek(#2011/4/2#,0) -> #2011/04/03 23:59:59# End time of this week
EndOfNextWeek(#2011/4/2#,-1) -> #2011/03/27 23:59:59# End time of last week

In case that "Day demarcation time" of project settings is 08:00:00, start time will be "Day demarcation
time".
EndOfNextDay(#2011/4/2#,1) -> #2011/04/11 07:59:59# End time of next week.

81
Internal function

EndOfNextMonth( time, month )


Arguments time Base time.
month Integer. Added monthes.
Return value Return the end time after added monthes based on the time.
Example EndOfNextMonth(#2011/4/2#,1) -> #2011/05/31 23:59:59# End time of next month
EndOfNextMonth(#2011/4/2#,0) -> #2011/04/30 23:59:59# End time of this month
EndOfNextMonth(#2011/4/2#,-1) -> #2011/03/31 23:59:59# End time of last month

If the [Day demarcation time] property in project setting window is 08:00:00, the the end time is start
from 08:00:00.
EndOfNextMonth(#2011/4/2#,1) -> #2011/06/01 07:59:59# End time of next month.

Work time
AdvanceAlongResourceWorkingTime( resouce, time, timeSpan )
Arguments resource Resource object.
time Base time.
timeSpan Advance time.
Return value Return the time after timeSpan from the base time along with resource work time.
Example AdvanceAlongResourceWorkingTime(ME,#2008/06/09 00:00:00#,24h) -> #2008/06/10 21:00:00#

ME is Mixer1. Return the time after 24 hours from 2008/06/09 00:00:00 along with the work time of
Mixer1.

Remarks When the second argument is minus value, it return the past time.

82
Internal function

GetWorkingDays ( start, end, resource, mintime )


Arguments start Calculated start time
end Calculated end time.
resource Resource object.
mintime Minimum work time is essential for accounting.
Return value Return how many times the time period is longer than minimum work time from start time to end time of
resource.
Example GetWorkingDays(#2008/06/09 00:00:00#,#2008/06/11 00:00:00#,ME,5h) -> 2

ME is Mixer1. There are 2 time periods which is longer than 5 hours from 2008/06/09 00:00:00 to
2008/06/11 00:00:00, then return 2.

GetWorkingDays(#2008/06/09 00:00:00#,#2008/06/11 00:00:00#,ME,4h) -> 4

ME is Mixer1. There are 4 time periods which is longer than 4 hours from 2008/06/09 00:00:00 to
2008/06/11 00:00:00, then return 4.

83
Internal function

GetWorkingTime( start, end, resource )


Arguments start Start time of time period.
end End time of time period.
resource Resource object.
Return value Return the total work time of specified resource from start to end.
Example GetWorkingTime(#2008/06/09 00:00:00#,#2008/06/11 00:00:00#,ME) -> 1440M

ME is Mixer1. Return 1440 minutes work time of Mixer1 from 2008/06/09 00:00:00 to 2008/06/11
00:00:00.

84
Internal function

Load/Production time/Setup time/Left time and so on


CalcOrderLeeway(oper )
Arguments Oper Operation object.
Return value Return leeway of oper. The leeway is the value of (EST-Due date)/Left production time expression.
Example CalcOrderLeeway(ME.Operation) -> 0.5

The expressions are described as follows.(0<=Order leeway<1)

(LET of order - Effective user specified EST of operation) - Left production time
(LET of order - Effective user specified EST of operation)

When left production time is 10 days and there is 20 days between LET and EST, 0.5 will be returned.

Order EST Order LET


6 days

4 days
20 days

Order due date - Effective user specified EST > 0 && Order due date - Effective user specified EST <
Left production time
Or
Order due date - Effective user specified EST < 0(Order leeway<0)

(LET of order - Effective user specified EST of operation) - Left production time
(Left production time)

When left production time is 22 days, -0.0909 will be returned.


Order EST Order LET

22 days
20 days
Remarks Order leeway of Default dispatching keys is used.

85
Internal function

CalcProductionTime( resource, start, end )


Arguments resource Resource object.
start Start time of calculation range.
end End time of calculation range.
Return value Return the total production time of the operation which start time is in the period from the start time of
the resource to the end time of the resource.
Example CalcProductionTime(ME, #2009/06/05 00:00:00#, #2009/06/07 00:00:00#) -> 6H

ME is Mixer1. Return the total production time (6 hours) from 06/05 to 06/07.
6/5 6/6

Production time Production time Production time


Mixer1
2 hours 2 hours 2 hours

CalcRemainingProductionTime( oper )
Arguments oper Operation object.
Return value Return the total production time of the operation which start time is in the period from the start time of
the resource to the end time of the resource.
Example CalcRemainingProduction(ME.Operation) -> 7H

ME operation is process40 with forward assignment. Return total production time(7 hours) of left
process is process50 and process60.

Proc 10
3 hours

Proc 20 Proc 30 Proc 40 Proc 50 Proc 60


4 hours 1 hours 6 hours 5 hours 2 hours

ME operation is process40 with backward assignment. Return total production time(8 hours) of left
process10, process20 and process30.
Proc 10
3 hours

Proc 20 Proc 30 Proc 40 Proc 50 Proc 60


4 hours 1 hours 6 hours 5 hours 2 hours

Remarks It is used by the left production time of default dispatching keys.

86
Internal function

CalcRemainingTime( oper )
Arguments oper Operation object.
Return value Return the time difference between end time of the operation and the LET.
Example CalcRemainingTime(ME.Operation) -> 1D20H

ME.Operation is 01:20. Return the time difference(44hours = 1D20H) between end time of current
processes and the LET.
2009/06/04 04:00:00 Order LET
2009/06/06

01:10 1 day 20 hours

01:20

01:30

GetProductionTime( oper )
Arguments oper Operation object
Return value Return the total production time (remaining production time) of the operation which belongs to next
process after "oper" operation.
Example GetProductionTime(ME.Operation) -> 10H

ME.Operation is 01:10. Return 10h (10 hours).

Operation 01:10
Mixer1
Production time 10 hours

Remarks It is used by the left Production time of last assignment of default dispatching keys.

CalcSetupTime( resource, start, end )


Arguments resource Resource object
start Start time of calculation range.
end End time of calculation range.
Return value Return total setup time of the resource from the start time to the end time.
Example CalcSetupTime(ME, #2009/06/05 00:00:00#, #2009/06/07 00:00:00#) -> 1H30M

ME is Mixer1. Return the total setup time (1H30M) of Mixer1 from 06/05 to 06/07.

6/5 6/6

Mixer1

30m 30m 30m

87
Internal function

CalcTeardownTime( resource, start, end )


Arguments resource Resource object.
start Start time of calculation range.
end End time of calculation range.
Return value Return total teardown time of the resource from the start time to the end time.
Example CalcTeardownTime(ME, #2009/06/05 00:00:00#, #2009/06/07 00:00:00#) -> 1H

ME is Mixer1. Return total teardown time (1H) of the resource from 06/05 to 06/07.
6/5 6/6

Mixer1

30m 30m

ResourceLoad ( resource, start, end )


Arguments resource Resource object.
start Calculation start time
end Calculation end time
Return value Return calculated resource load from start time to end time. If there is no operation, the value will be 1,
the load is 100%, and the value will be zero.
Example ResourceLoad(ME,#2008/06/09 00:00:00#,#2008/06/10 00:00:00#) -> 0
ResourceLoad(ME,#2008/06/10 00:00:00#,#2008/06/11 00:00:00#) -> 0.07444444
ResourceLoad(ME,#2008/06/11 00:00:00#,#2008/06/12 00:00:00#) -> 1

ME is Packer3. Resource load from 2008/06/09 00:00:00 to 2008/06/10 00:00:00 is 100%.


It is 0.07444444 from 2008/06/10 00:00:00 to 2008/06/11 00:00:00.
It is 1 from 2008/06/11 00:00:00 to 2008/06/13 00:00:00.
In a short word, it returns the resource free load ratio.

88
Internal function

ResourceLoadIF ( resource, start, end, condition )


Arguments resource Resource object.
start Calculation start time
end Calculation end time
condition Condition expression to filter use instruction.
Return value Returns the resource load of use instructions filtered by condition expression from the calculated start
time to calculated end time.
If there is no use instruction, the return value is 1. If the resource load is 100%, the return value is 0.
Example ResourceLoadIF(ME,#2009/06/04 00:00:00#,#2009/06/09 00:00:00#,TARGET.Work.Type=='P') ->
0.666666…

ME is "Mixer1". Calculate the resource load of production task from 2009/06/04 00:00:00 to 2009/06/09
00:00:00.

If ResorurceLoad() is used as above, it will be 0 (the resource load is 100%).


ResourceLoad(ME,#2009/06/04 00:00:00#,#2009/06/09 00:00:00#) -> 0

ResourceLoadByResourceQtyTime ( resource, start, end, condition )


Arguments resource Resource object.
start Calculated start time.
end Calculated end time.
condition Condition expression to filter use instruction.
Return value Returns the resource qty time(work time * resource qty) from the calculated start time to calculated end
time.
Example ResourceLoadByResourceQtyTime(ME,#2009/06/04 00:00:00#,#2009/06/09
00:00:00#,TARGET.Work.Type=='P') -> 57600

ME is Mixer1. Returns the resource qty time of production task from 2009/06/04 00:00:00 to 2009/06/09
00:00:00.
Return value is 4H*1 + 4H*2 + 4H*1 = 57600S (16H).

89
Internal function

Property
FValid( prop )
Arguments prop Property of object.
Return value Return TRUE when the value of prop existed, or else return FALSE.
Example FValid(ME.'Order quantity') -> FALSE

ME is order. In case that ME.'Order quantity' is null, return FALSE. (In case that ME.'Order quantity' is
not null, return TRUE)

PropCount( prop )
Arguments prop Array property of object.
Return Return the element account of array property.
value
Example PropCount(ME.Comments) -> 3

In case that there are 3 pieces of comments, then return 3.

Remarks If it’s not an array property, 1 will be returned.

CheckAllContents_And( prop, condition, value )


Arguments prop Property of object.
condition String. Comparison operator.
value String. Comparison condition.
Return value In case that property prop meets the comparison operator and comparison condition, return TRUE. Or
else return FALSE. In case that there are several valuse in prop, all values should meet the condition,
then return TRUE.
Example CheckAllContents_And(ME.Comments,'==', 'c') -> FALSE

Comment of order is set as 'a;b;c;d'. Not every element equals 'c', then return FALSE.
Remarks In case of Comments which have several values, all values are be validated.

CheckAllContents_Or( str, condition, value )


Arguments prop Property of object.
condition String. Comparison operator.
value String. Comparison condition.
Return value In case that property prop meets the comparison operator and comparison condition, return TRUE. Or
else return FALSE. In case that there are several valuse in prop, any one meet the condition, then return
TRUE.
Example CheckAllContents_And(ME.Comments,'==', 'c') -> TRUE

Comment of order is set as 'a;b;c;d'. One element equals 'c', then return TRUE..
Remarks In case that there are several values of prop, all values are be validated.

90
Internal function

GetObjectName( obj )
Arguments obj Object
Return value Returns the name of the object given as an argument by its alias, display name, and name in the sequence
they currently exist.
Example GetObjectName(PROJECT) -> 'Sample1'

If the alias is specified, return the alias "Sample1". If the alias is null, return the display name.

DisplayStr( prop )
Arguments prop Property of object.
Return value Returns the result of evaluating the display expression of the specified property, if a display expression is
set.
Example DisplayStr(ME.'Order quantity') -> '50Unit'

ME is order. The expression of order quantity property is 'ME.Qty+'Unit'', then return '50Unit'.

GetEnumName( prop )
Arguments prop The enumeration
Return value Name of the value for the given property
Example GetEnumName(ME.Status) -> 'Released'

ME is operation. The status of the operation is an enumeration value, then return the string for the given
enumeration.

ExpressionStr( prop, 0 )
Arguments prop Property to obtain the expression from
0 Not used
Return value Expression string
Example Find(ExpressionStr(ME.VirtualPropertyExpression,0),'Format')

Filter the virtual property expression which contain 'Format' string in property definition table.

91
Internal function

Minimum/Maximum/Sum
Max( list, prop )
Arguments list Class name
prop Property
Return value Maximum value of the property on the specified object list
Example Max('Order', Target.'Order quantity') -> 50

There are three records in order table. Return the maximum of order quantity(50).
Order code Item code Order quantity
01 ProductA 50
02 ProductA 35
03 ProductB 20

Max(ME.Child,TARGET.Work_OperationProductionTime) -> 10800

ME.Child is order. The minimum production time(1080s) of operation related with the order.
Process10 2H

Process20 3H

Process30 2H

Process40 1H

MaxIF( list, condition, prop )


Arguments list Class name or an object-type property
condition Condition for filtering the list
prop Target property
Return value Returns the maximum value of the specified property for the objects in the list satisfying the specified
condition.
Example MaxIF('Order',TARGET.Item=='Product‚`',TARGET.'Order quantity') -> 50

There are three records in order table. Return the maximum order quantity (50) of ProductA.
Order code Item code Order quantity
01 ProductA 50
02 ProductA 35
03 ProductB 20

MaxIF(ME.Child,TARGET.Work_OperationProcNo>=30,TARGET.Work_OperationProductionTime) ->
7200

ME.Child is order. Return maximum production time (7200s) of the operations which process number is
bigger than or equal 30.
Process10 2H
Process20 2H

Process30 2H
Process40 1H

Min( obj, prop )


Arguments list Class name
92
Internal function
prop Property
Return value Returns the minimum value of the specified property for the objects in the list.
Example Min('Order', Target.'Order quantity') -> 20

There are three records in order table. Return the minimum orde quantity (20) in the order list.
Order code Item code Order quantity
01 ProductA 50
02 ProductA 35
03 ProductB 20

Min(ME.Child,TARGET.Work_OperationProductionTime) -> 3600

ME.Child is order. Return the minimum production time (3600s) in the order list.

Process10 2H

Process20 3H

Process30 2H

Process40 1H

MinIF( list, condition, prop )


Arguments list Class name
condition Filter expression
prop Property
Return Returns the minimum value of the specified property for the objects in the list satisfying the specified
value condition.
Example MinIF('Order',TARGET.Item=='Product‚`',TARGET.'Order quantity') -> 20

There are three records in order table. Return the minimum order quantity(20) in order list whose item is
ProductA .
Order code Item code Order quantity
01 ProductionA 50
02 ProductionA 35
03 ProductionB 20

MinIF(ME.Child,TARGET.Work_OperationProcNo>=30,TARGET.Work_OperationProductionTime) ->
3600

ME.Child is order. Return the minimum production time(3600) of the order's operations whose process
number is bigger than 30.
Process10 2H

Process20 3H

Process30 2H

Process40 1H

Sum( list, prop )


Arguments list Class name or an object-type property
prop Target property
Return value Returns the sum of the values of the specified property for the objects in the list.
93
Internal function
Example Sum('Order', Target.'Order quantity') -> 105

There are three records in the order table. Return the total account (105) of orders.
Order code Item code Order quantity
01 ProductA 50
02 ProductA 35
03 ProductB 20

Sum(ME.Child,TARGET.Work_OperationProductionTime) -> 28800

ME.Child is order. Return the operations production time (28800s) of the order.

Process10 2H

Process20 3H

Process30 2H

Process40 1H

SumIF( list, condition, prop )


Arguments List Class name or object list
condition Filter condition
prop Property
Return value Returns the sum of the values of the specified property for the objects in the list satisfying the specified
condition.
Example SumIF('Order',TARGET.Item=='Product‚`',TARGET.'Order quantity') -> 85

There are three records in order table. Return the total order quantity of the orders whose item is
ProductA.
Order code Item code Order quantity
01 ProductA 50
02 ProductA 35
03 ProductB 20

SumIF(ME.Child,TARGET.Work_OperationProcNo>=30,TARGET.Work_OperationProductionTime) ->
10800

ME.Child is order. Return the total production time(10800s) of the operations whose process number is
bigger than and equal 30.
Process10 2H

Process20 3H

Process30 2H

Process40 1H

Product( list, prop )


Arguments list Object class name (String) or object list
prop Object property
Return value Return the multiplied value of specified property in specified object list.

94
Internal function
ProductIF( list, condition, prop )
Arguments list Object class name (String) or object list
condition Filter expression
prop Object property
Return value Return the multiplied value of specified property in filtered object list.

Equal( prop )
Arguments prop Target property
Return value Compared with the target property. Return TRUE in case of equal, or else return FALSE.
Example Equal(ME.Order.Customer)

Associate the orders with the same ME.Order.Customer. Order 01 and Order 02 have the same customer
CustomerA. The customer of order 03 is different, CustomerB.

Remarks This function can only be used in the pegging condition of item class.
Equal(ME.Order.Customer) has the same meaning with this expression, ME.Order.Customer ==
Other.Order.Customer.

Spec/SpecNum
GetApplicableNumSpec ( index, oper )
Arguments index Num spec #
oper Operation
Return value Num spec applicable to the operation.
Example ME is operation. In case that the NumSpec1 of this operation is 100.
GetApplicableNumSpec(1, ME) -> 100
Remarks Index is the serial number of NumSpec.
Index = 1 -> NumSpec1, index = 2 -> NumSpec2, index = 3 -> NumSpec3, index = 4 -> NumSpec4 ...
It is used in NumSpec# of Default dispatching keys.

95
Internal function

GetApplicableSpec( index, oper )


Arguments index Spec #
oper Operation
Return value Spec applicable to the operation.
Example ME is operation. In case that the order related with this operation is set with "Red".
GetApplicableSpec(1, ME) -> "Red"
Remarks Index is the serial number of Spec.
Index = 1 -> Spec1, index = 2 -> Spec2, index = 3 -> Spec3, index = 4 -> Spec4 ...
It is used in Spec# of Default dispatching keys.

Math functions
Round( value, precision )
Arguments value Float
precision Number of decimal placeholds
Return value Returns a number rounded to the specified number of decimal places.
Example Round(10.4567,3) -> 10.457
Round(10.4567,3) -> -10.457
Round(234.56, -1) -> 230
Round(345.67, -1) -> 350
Remarks Round the value up to ceil when the value is positive number. Round the vlaue down to floor when the
value is nagetive number.

Roundup( value, precision )


Arguments value Float
precision Number of decimal placeholds
Return value Returns a number rounded up to the specified number of decimal places.
Example Roundup(10.1234,3) -> 10.124
Roundup(-10.1234,3) -> -10.123
Roundup(234.56, -1) -> 240
Roundup(345.67, -1) -> 350
Remarks Round the value up to ceil when the value is positive number. Round the vlaue down to floor when the
value is nagetive number.

Truncate( value, precision )


Arguments value Float
precision Number of decimal placeholds
Return value Returns a number truncated to the specified number of decimal places.
Example Truncate(10.4567,3) -> 10.456
Truncate(-10.4567,3) -> -10.457
Truncate(234.56, -1) -> 230
Truncate(345.67, -1) -> 340
Remarks Round the value up to ceil when the value is positive number. Round the vlaue down to floor when the
value is nagetive number.

Abs( value )
Arguments value Float
Return value Absolute value function
Example Abs(-1.23) -> 1.23
Abs(1.23) -> 1.23

Sin( value )
96
Internal function
Arguments value Float
Return value Returns the sin value.
Example Sin(0) -> 0

Cos( value )
Arguments value Float
Return value Returns the cos value.
Example Cos(0) -> 1

Tan( value )
Arguments value Float
Return value Returns the tan value.
Example Tan(0) -> 0

Power( value, exponent )


Arguments value x of (x to the yth power)
exponent y of (x to the yth power)
Return value Power function (x to the yth power)
Example Power(10,3) -> 1000

Sqrt( value )
Arguments value Float
Return value Returns the root value.
Example Sqrt(100) -> 10

Ln( value )
Arguments value Float
Return value Returns the natural log of the argument.
Example Ln(2.71828183) -> 1

Log( value )
Arguments value Float
Return value Returns the log with base of 10.
Example Lon(100) -> 10

Exp( value )
Arguments value Float
Return value Returns the exponential function value.
Example Exp(1) -> 2.71828183

NormalizeAscend ( val )
Arguments value Float
Return value Normalizes the argument to a value between 0 and 1 (when x=0, y=0; when x=+/-infinity,y=1).
Example NormalizeAscend(0) -> 0
NormalizeAscend(2) -> 0.666667
Remarks value / ( value + 1.0 )
It is used in the additional evaluation expression of resource evaluation object.

NormalizeDescend ( value )
Arguments value Float

97
Internal function
Return value Normalizes the argument to a value between 0 and 1 (when x=0, y=1; when x=+/-infinity,y=0).
Example NormalizeDescend(0) -> 1
NormalizeDescend(2) -> 0.333333
Remarks 1/ ( value + 1.0 )
It is used in the additional evaluation expression of resource evaluation object.

Others
RGB( red, green, blue )
Arguments red 0-255. Byte that Specifies Red
green 0-255. Byte that Specifies Green
blue 0-255. Byte that Specifies Blue
Return Given RGB format Color, returns its equivalent Color Type Property.
value
Example RGB(0,255,255) -> Cyan

RGB(255-GetApplicableNumSpec(1,ME.Operation),255-GetApplicableNumSpec(1,ME.Operation),255)
-> The bigger the NumSpec1, the deeper blue the color.

Remarks It is used to change the bar color in resource Gantt chart and other charts.

98
Internal function

CalcInventory( item, datetime )


Arguments item Target item
datetime Target time
Return value Returns the inventory quantity of the specified item at the specified point in time.
Example CalcInventory(ME,#2008/06/07 12:00:00#) -> 30

ME.Item is ProductA, the inventory quantity is 30 at 2008/06/07 12:00:00.

CurrencyFormat( value )
Arguments value Value to convert using the currency format
Return value Converts the specified value according to the currency format set in the workspace settings.
Example Set the "Number format" property in "Inventory graph" tab of display settings window as
[CurrencyFormat(ME.Value*ME.Item.Price)]. Set the "Currency format" property in "Local" tab of
"Edit Workspace" window as [Format(INPUT/1000,'##0.')+ 'T'] ('T' means thousand). Then it caculate
the inventory item value according to the item unit price and display it in inventory graph.

Remarks Set the currency format in "Locale" tab of "Workspace settings" dialog.

99
Internal function

GetResourceByUseBomCode( oper, useinstCode )


Arguments oper Operation
useinstCode Use instruction code
Return value Obtains the resource used by an operation by specifying a use instruction code. It cannot be used in the
"Additional evaluation expression" property of "Resource evaluation" object.
Example GetResourceByUseBomCode(ME.Operation, 'S0') -> MixWorker1

ME.Operation is operation 02:Mixing. Return the sub resource(MixWorker1) which use instruction code
is "S0".

100
Internal function

GetNumCandidateResource( oper )
Arguments oper Operation
Return value Return the candidate real number.
Example GetNumCandidateResource(ME.Operation) -> 3

ME.Operation is 06:Packing. There are 3 resource registered as use instruction in master table, then
return 3.

GetNumCandidateResource(ME.Operation) -> 6

ME.Operation is 06:Packing. There are 3 resources for task selector 1 and 3 resources for task selector2
registered as use instruction in master table, so return total resource account(6) for all task selectors.

GetDispatchingEvalByUseBomCode( oper, useinstCode )


Arguments oper Operation
useinstCode Use instruction code
Return value Obtains tentative assignment information about an operation on a specific resource by specifying a use
instruction code.
Example GetDispatchingEvalByUseBomCode(ME, 'M') -> Resource evaluation object of use instruction 'M'
Remarks Resource evaluation object is the object which can use [Additional evaluation expression] property of
resource evaluation. It is used only during the scheduling process.
[Additional evaluation expression] property of resource object is used to make decisions during
scheduling process

101
Internal function

GetNumProcessToGo( oper )
Arguments oper Operation
Return value Return the number of next operations of oper.
Example GetNumProcessToGo(ME.Operation) -> 2

ME.Operation is 1:20. Return the number of next operations of 1:20.


Operation 1:10

Operation 1:20

Operation 1:30

Operation 1:40

Remarks It is used by left process number of "Default dispatching keys".

GetPeggedRate( prevoper, opert )


Arguments prevoper Previous process operation
oper Following process operation
Return value Returns the percentage of the previous process's output quantity that is pegged to the following process.
Example GetPeggedRate(ME.Operation.PrevOperation, ME.Operation) -> 0.3

ME.Operation.PrevOperation is [1:10]. ME.Operation is [1:20:001]. Production quantity 30 is divided


by 100, then return 0.3. If ME.Operation is [1:20:002], production quantity 70 is divided by 100, then
return 0.7.

Operation 1:10
Production qty 100

Operation 1:20:001 Operation 1:20:002


Production qty 30 Production qty 70

GetRootChildListString()
Arguments None
Return value Returns a list of all children under the root object, separated by commas.
Example GetRootChildListString() -> "ClassDef,PropertyDef,InCodeFunction,Workspace,Project"

Internal use
IsOptionalFeatureEnabled ( num )
Remarks Used by Apsorva internally. Obtains the result whether the specified option is available or not.
IsSerialNumberActivatedFeatureEnabled( num )
Remarks Used by Apsorva internally. Obtains the result whether the specified feature is available or not.
IsVersionDependentFeatureEnabled( num )
Remarks Used by Apsorva internally. Obtains the result whether the specified feature is a restricted feature or not.

Internal functions: ABC order list

102
Internal function
Abs Absolute value function

AdvanceAlongResourceWorkingTime Returns the time resulting from advancing a certain length of time along the working
time of a resource measured from a specified starting time.
CalcInventory Returns the inventory quantity of the specified item at the specified point in time.

CalcOrderLeeway (Remaining production time - Remaining time) / Remaining time

CalcProductionTime Calculates the total amount of production time within the specified time span on the
specified resource.
CalcRemainingProductionTime Total production time of operations of processes to go (Remaining production time)

CalcRemainingTime Time span from the most advanced end time of previous process operations to due date
(Remaining time)
CalcSetupTime Calculates the total amount of setup time within the specified time span on the
specified resource.
CalcTeardownTime Calculates the total amount of teardown time within the specified time span on the
specified resource.
CheckAllContents_And Given a property, it does an And check of all values in the specified property

CheckAllContents_Or Given a property, it does an Or check of all values in the specified property

ConvertTime Converts a time span into a floating point value of the specified unit.

Cos cos(x)

CurrencyFormat Converts the specified value according to the currency format set in the workspace
settings. Assumes that the currency format expression returns a string type. If not
currency format is set, then simply converts the specified value into a string as-is.
DateF Returns a time representing the specified year, month, day, hour, minute, and second.

DateS Returns a time representing the specified year, month and day.

DateT Returns a time representing the specified year, month, day, and time of day.

DisplayStr Returns the result of evaluating the display expression of the specified property, if a
display expression is set.
EndOfNextDay One second before the start of the day (x+1) days after the specified point in time
(Example: EndOfNextDay(2004/01/01 16:00, 3) -> 2004/01/05 7:59)
EndOfNextMonth One second before the start of the month (x+1) months after the specified point in time
(Example: EndOfNextWeek(2004/01/01 16:00, 1) -> 2004/03/01 7:59)
EndOfNextWeek One second before the start of the week (x+1) weeks after the specified point in time
(Example of the start of the week 2 weeks after the Thursday, 2004/01/01 16:00 (day
demarcation time: 8:00):
EndOfNextWeek(2004/01/01 16:00, 2) -> 2004/01/19 7:59 )
Equal On specific cases, this function is used to compare properties of two different objects.
Used only for the property Pegging condition of the item class.
Exp Exponential function (xth power of e)

Find Returns true to the first occurrence of a search string in a string.

FindNumberL Finds the nth number from the left in the specified string.

FindNumberR Finds the nth number from the right in the specified string.

Format Converts a time, a number, and so on to a string according to a specified format.


Similar use to Visual Basic Format function.
FValid Checks whether the property exists and is valid.

GenStrSerialNum Generates a zero-padded serial number string with a specified numerical value and
number of digits.
GetApplicableNumSpec Num spec applicable to the operation. When a num spec is applied to the order, will
apply that num spec. Otherwise, will apply the num spec specified for the item.

103
Internal function
GetApplicableSpec Spec applicable to the operation. When a spec is applied to the order, will apply that
spec. Otherwise, will apply the spec specified for the item.
GetDayPart Returns the day part from the specified base date/time by an integer from 1 to 31.

GetDispatchingEvalByUseBomCode Obtains tentative assignment information about an operation on a specific resource by


specifying a use instruction code.
GetHourPart Returns the hour part from the specified base time by an integer from 0 to 24.

GetMinutePart Returns the minute part from the specified base time by an integer from 0 to 59.。

GetMonthPart Returns the month part from the specified base date/time by an integer from 1 to 12.

GetNumCandidateResource Number of candidate resources

GetNumProcessToGo Number of processes to go

GetObjectName Returns the name of the object given as an argument by its alias, display name, and
name in the sequence they currently exist.
GetPeggedRate Returns the percentage of the previous process's output quantity that is pegged to the
following process.
GetProductionTime Returns production time from the operation.

GetResourceByUseBomCode Obtains the resource used by an operation by specifying a use instruction code.

GetRootChildListString List of all children under the root object, separated by commas.

GetSecondPart Returns the second part from the specified base time by an integer from 0 to 59.

GetTimePart Gets the time of day from a date-time.

GetWorkingDays Returns the number of working days in a certain period on the specified resource.

GetWorkingTime Returns the total working time in seconds in a certain period on the specified resource.

GetYearPart Returns the year part from the specified base date/time.

IsOptionalFeatureEnabled Internally used. Obtains the validity of the specified optional feature.

IsSerialNumberActivatedFeatureEnabled Returns whether the specified feature is enabled. For internal use.

IsVersionDependentFeatureEnabled Internally used. Obtains whether or not the specified feature is restricted by the module
version.
Left Returns a string containing a specified number of characters from the left side of a
string. Similar use to Visual Basic Left function.
LeftB Returns the left part of a string, up to the length specified in bytes. In the case where
the last byte of the string to be returned is the beginning of a multibyte character, the
third parameter says whether to include that character in the returned string (1), or to
discard it (0).
Len Returns an integer containing the number of characters in a string. Similar use to
Visual Basic Len function.
LenB Returns the length of a string in bytes. Usage is the same as for Visual Basic's LenB
function.
Ln Log function (base=e)

Log Log function (base=10)

Max Returns the maximum value of the specified property for the objects in the list.

MaxIF Returns the maximum value of the specified property for the objects in the list
satisfying the specified condition.

104
Internal function
Mid Returns a string containing a specified number of characters from a string. Similar use
to Visual Basic Mid Function.
Min Returns the minimum value of the specified property for the objects in the list.

MinIF Returns the minimum value of the specified property for the objects in the list
satisfying the specified condition.
NormalizeAscend x / ( x + 1.0)

NormalizeDescend 1.0 / ( x + 1.0 )

Now Returns a Date with current date and time.

Power Power function (x to the yth power)

Product Return the multiplied value of specified property in specified object list.

ProductIF Return the multiplied value of specified property in filtered object list.

PropCount Returns the number of elements of the specified property.

ResourceLoad Calculates resource load

ResourceLoadIF Returns the resource load of use instructions filtered by condition expression from the
calculated start time to calculated end time.
If there is no use instruction, the return value is 1. If the resource load is 100%, the
return value is 0.
ResourceLoadByQtyTime Returns the resource qty time(work time * resource qty) from the calculated start time
to calculated end time.
RGB Given RGB format Color, returns its equivalent Color Type Property.

Right Returns a string containing a specified number of characters from the right side of a
string. Similar use to Visual Basic Right function.
RightB Returns the right part of a string, up to the length specified in bytes. In the case where
the last byte of the string to be returned is the beginning of a multibyte character, the
third parameter says whether to include that character in the returned string (1), or to
discard it (0).
Round Returns a number rounded to the specified number of decimal places.

Roundup Returns a number rounded up to the specified number of decimal places.

Sin sin(x)

Sqrt Square root function

StartOfNextDay Start of the day x day(s) after the specified point in time (Example when the day
demarcation time is 8:00:
StartOfNextDay(2004/01/01 16:00, 3) -> 2004/01/04 8:00 )
StartOfNextMonth Start of the month x months after the specified point in time (Example:
StartOfNextMonth(2004/01/01 16:00, 1) -> 2004/02/01 8:00 )
StartOfNextWeek Start of the Monday of the week x weeks after the specified point in time (Example of
the start of the week 2 weeks after the Thursday, 2004/01/01 16:00 (day demarcation
time: 8:00):
StartOfNextDay(2004/01/01 16:00, 2) -> 2004/01/12 8:00)
StrStr Returns the position to the first occurrence of a search string in a string. The count
begins with 1.
Sum Returns the sum of the values of the specified property for the objects in the list.

105
Internal function
SumIF Returns the sum of the values of the specified property for the objects in the list
satisfying the specified condition.
Tan tan(x)

Truncate Returns a number truncated to the specified number of decimal places.

106
Index
Index

—A— GetMonthPart .................................................................. 19


Abs ................................................................................... 21 GetSecondPart ................................................................. 19
Additional evaluation expression (Resource evaluation) . 68 GetTimePart ..................................................................... 19
AdvanceAlongResourceWorkingTime ............................ 20 GetYearPart ...................................................................... 19
Assignment end time ....................................................... 45 —I—
Assignment start time ...................................................... 45 If ..................................................................................... 16
Auto-generated intermediate item code expression ......... 53 Import property conversion expression ............................ 50
Auto-generated one-to-one order code expression .......... 53 INPUT........................................................................ 15, 43
—B— Input qty formulaMaster input instruction) ...................... 66
Background color expression ........................................... 38 Instruction output period end time ................................... 45
Bar color expression ........................................................ 33 Inventory valid period (Item) ........................................... 45
Bar flag color expression ................................................. 33 Inventory valid period (Order) ......................................... 45
—C— —L—
Convert Left................................................................................... 17
Date->number .............................................................. 20 Len ................................................................................... 16
ConvertTime .................................................................... 20 Ln ..................................................................................... 21
Cos ................................................................................... 21 Log ................................................................................... 21
—D— —M—
Data tip text...................................................................... 39 ME ................................................................................... 15
DateF ............................................................................... 20 Mid................................................................................... 17
DateS ............................................................................... 20 —N—
DateT ............................................................................... 20 New line 改行 .................................................................. 16
DELETE .......................................................................... 20 NormalizeAscend............................................................. 21
Dispatching key ............................................................... 62 NormalizeDescend ........................................................... 21
Display end time .............................................................. 45 Now ................................................................................. 18
Display expression ........................................................... 43 Number format................................................................. 42
Display start time ............................................................. 45 —O—
—E— One to one pegged order property assign expressions ..... 49
Evaluation expression(Sequence control evaluation keys) Operation ......................................................................... 52
..................................................................................... 69 Operation bar inside text color expression ....................... 36
Event order code expression ............................................ 53 Operation bar inside text expression ................................ 41
Exp ................................................................................... 21 Operation bar right text color expression ......................... 36
Export property conversion expression............................ 50 Operation bar right text expression .................................. 41
—F— Operation data tip text expression .................................... 41
Find .................................................................................. 17 Operation expression ....................................................... 51
FindNumberL .................................................................. 17 Operation left part text expression ................................... 41
FindNumberR .................................................................. 17 Operation status bar text expression ................................ 41
Format ...................................................................18, 19, 21 Operationproperty assign expressions ............................. 49
Freeze period end time ..................................................... 45 Order bar inside text color expression ............................. 35
Furnace valid condition ................................................... 48 Order bar inside text expression ...................................... 40
Furnace valid condition (Setup) ....................................... 48 Order bar right text color expression ............................... 35
Furnace valid condition (Teardown) .............................. 48 Order bar right text expression ........................................ 40
FValid............................................................................... 22 Order data tip text expression .......................................... 40
—G— Order expression .............................................................. 51
GetApplicableNumSpec .................................................. 40 Order left part text expression .......................................... 40
GetApplicableSpec .......................................................... 40 Order status bar text expression ....................................... 40
GetDayPart ...................................................................... 19 OTHER ............................................................................ 15
GetHourPart ..................................................................... 19 Output qty formula(Master output instruction) ................ 66
GetMinutePart.................................................................. 19

107
Index
—P— —T—
Pegging condition ............................................................ 48 Tan ................................................................................... 21
Power ............................................................................... 21 Task bar inside text color expression ............................... 37
Process selector valid condition ....................................... 47 Task bar inside text expression ........................................ 42
Production qty formula(Master input instruction) ........... 66 Task bar right text color expression ................................. 37
Production qty formula(Master output instruction) ......... 66 Task bar right text expression .......................................... 42
Production(Integrated master editor table) ................ 64, 65 Task data tip text expression ............................................ 42
PROJECT ........................................................................ 15 Task left part text expression ........................................... 42
—R— Task selector valid condition............................................ 47
Replenishment manufacturing order code expression ..... 52 Task status bar text expression ......................................... 42
Replenishment manufacturing order property assign Teardown(Integrated master editor table) .................. 64, 65
expressions ................................................................... 49 Text color expression ....................................................... 38
Replenishment purchase order code expression .............. 52 Theoretical inventory calculation time ............................ 45
Replenishment purchase order property assign expressions Theoretical inventory code expression ............................ 53
..................................................................................... 49 Truncate ........................................................................... 20
Right ................................................................................ 17 —U—
Round............................................................................... 20 Use instruction bar text color expression ......................... 35
Roundup........................................................................... 20 Use instruction bar text expression .................................. 39
—S— Use instruction status bar text expression ........................ 39
Scheduling basis time ...................................................... 45 —V—
Setup(Integrated master editor table) ......................... 64, 65 Valid condition ................................................................. 47
Sin .................................................................................... 21 Valid condition (Master input instruction) ....................... 47
Split child operation property assign expressions ............ 49 Valid condition (Master output instruction) ..................... 47
Sqrt................................................................................... 21 Valid condition (Master use instruction) .......................... 47
StartOfNextDay ............................................................... 18 Virtual property expression .............................................. 43
StartOfNextMonth ........................................................... 18 —W—
StartOfNextWeek ............................................................. 18 WORKSPACE ................................................................. 15
StrStr ................................................................................ 17

108
Asprova Expression Handbook

July 2020 Published


Asprova Corporation
Gotanda KDX Building 3F, 7-9-2 Nishigotanda Shinagawa-ku, Tokyo 141-0031 Japan
Phone +81-3-6303-9933 Fax +81-3-6303-9930

E-mail [email protected]
Web http://www.asprova.com/

Copyright© since 1994 Asprova Corporation

109

You might also like