Sumerian Workday Time & Account Calculator and eTCL Slot Calculator Demo Example, numerical analysis

Sumerian Workday Time & Account Calculator with demo examples eTCL numerical analysis

This page is under development. Comments are welcome, but please load any comments in the comments section at the bottom of the page. Please include your wiki MONIKER and date in your comment with the same courtesy that I will give you. Aside from your courtesy, your wiki MONIKER and date as a signature and minimal good faith of any internet post are the rules of this TCL-WIKI. Its very hard to reply reasonably without some background of the correspondent on his WIKI bio page. Thanks, gold 12Dec2018



Preface

gold Here is some TCL calculations for workdays and accounting outlays from Sumerian texts. The impetus for these calculations was checking workday accounts, free time, and credits in some cuneiform texts and modern replicas. Most of the testcases involve replicas or models, using assumptions and rules of thumb.


Introduction

Here is a model calculation for 600 female workers over a year. For a year of 360 days, the available workdays were 600*12*30, 216000 days. The free time or time-off for females was 600*12*30*(1/6), 36000 days. The estimated bala service was 600*12*30*(1.4/60), 5040 days of bala service. The estimate of bala service tax (in labor and kind) from the province to the king was probably averaged decimal 2.33 percent of available workdays, but modern calculations from the tablet numbers are usually up to 10 percent off. The accounted workdays were workdays minus bala service, 216000 - 5040, 210960 workdays or 210960/30, 7032 months. For example, the workday quota of barley flour (dabin) was 10 liters per workday. While other grain flours were produced, the accounted workdays could produce 210960*10, 2109600 or 2.1E6 liters of barley flour. In metric terms, the female workers would receive 30 liters of grain per month. The accounted grain or total wages would be 7032*30, 210960 liters. Since a silver piece was equivalent to 300 liters of grain, the total wages in silver equivalent would be 210960/300, 703.2 silver pieces. In some account tablets, women with small children would receive 1+1/3 liters a day. Debits were previous years debit plus debit of 210960 barley liters. The credits were 210960 workdays, 5040 workdays of bala service, 36000 days of time-off, and material goods produced.


Here is a model calculation for 30 female workers in grinding grain over a month. For a month of 30 days, the available workdays were 30*30, 900 days. The free time or time-off for females was 30*30*(1/6), 150 days. The estimated bala service was 30*30*(1.4/60), 21 days of bala service. The accounted workdays were workdays minus bala service, 900-21, 879, rounded 880 workdays. The total wages would be 880 workdays times 1 liter per workday, 880*1, 880 liters of grain. The total wages in silver equivalent would be 880/300, 2.93 silver pieces. The daily work quota for grinding barley flour was 10 liters per day. The flour production from the workdays would be 880 WD *10 L/D, 8800, or 8.8E3 liters of barley flour. Debits included debit of 880 barley liters. The credits were 880 workdays, 21 workdays of bala service, 150 days of off-time, and material goods produced.


Here is a model calculation for 40 male full time workers (guru) over 2 months, but the time-off and wages for the males are different. For 2 months of 30 days each, the available workdays were 40*2*30, 2400 days. The free time or time-off for males was 40*2*30*(1/10), 240 days. The estimated bala service was 40*2*30*(1.4/60), 56 days of bala service. The accounted workdays were workdays minus bala service,2400-56, 2344, rounded 2345 workdays. The total wages would be 2345 workdays times 2 liters per workday, 2345*2, 4690 liters of grain. Since a silver piece was equivalent to 300 liters of grain, the total wages in silver equivalent would be 4690/300, 15.6 silver pieces. Debits included debit of 4690 barley liters. The credits were 2344 workdays, 56 workdays of bala service, 240 days of time-off, and material goods produced.


Here is a model calculation for 40 full time male porters (guru), 5 working children (dumi.gi) , 4 disabled soldiers (lu.hu.ku.bu ), and 2 older workers (su.gi) over one year plus extra intercalculary month at the Girsu military depot. However, the time-off, rated performance, and wages are different. As in the UrIII scribal accounts, the full time workers are calculated first and adjustments made for the remaining workers. For 13 months of 30 days each, the available workdays for the full time male workers were 40*13*30, 15600 days. The free time or time-off for males was 40*13*30*(1/10) was 1560 days. The estimated bala service was 40*13*30*(1.4/60), 364 days of bala service. The accounted workdays were full timer workdays minus bala service,15600-364,15236, rounded 15240 workdays. The adjustment workdays for the partial workers would be 13*30*(dumi.gi 5*(1/2)+ lu.hu.ku.bu 4*(1/3)+ sug.gi 2*(1/2)), 1885 workdays. The total workdays with adjustments would be 15240+ 1885, 17125 workdays. The total wages would be total adjusted workdays times 2 liters per workday, 17125*2, 34250 liters of grain. The full time workers would receive 2 barley liters per day. The part timer workers including 5 working children, 4 disabled soldiers, and 2 older workers received 1 barley liter per day. Debits included debit of 34250 barley liters. The credits were 17125 workdays, 364 workdays of bala service, 1560 days of time-off, and material goods transported.


From the available translations and UrIII history, the bala service tax seems to have originated as military/religious conscription for one month, originally through Sumerian clans alternating military/religious service. This military conscription was extended to goods and services from the UrIII provinces rotating bala service for one month to the central government (king). In the civilian labor accounts available to modern amateurs, there is a tax factor averaging (1.4/60), decimal factor 0.0233, 2.33 percent over the month. Since there is a decree of King Shulgi taxing half the harvest etc, the King's half might have been amortized over a solar year (12 months) or administrative period (19 provinces rotating service) in the accounts. Maybe numerical coincidence, but the King's half over the months as (1/2)*(1/12) = 0.0416 and (1/2)*(1/19) =0.026 are approaching order of magnitude to the bala taxes in the available accounts. Since the bala tax is taken off the top of the total workdays for the work teams, every worker and foreman is docked to some extent.


Bala Service Tax

The workday eTCL calculator is working correctly for all male crews. The adjusted workdays for bala service seem to be correct for males and females. However, the credited workdays, different wages and time-off days for mixed crews tend to be a snarl. For mixed crews that included children and invalids, the credited workdays was lowered at the first and in some tablets, listed as half or fractional workdays. The males were paid 2 barley liters and the females were paid usually 1 barley liter. The males have 1/10 time-off and the females have either 1/5 or 1/6 time-off. The hours of men and women are treated equally in the accounts for the work performance and especially the bala tax, otherwise the bala tax would be lessened for the king. Some tablets did not use the bala tax, or at least the remaining and readable fragments do not overtly mention the bala tax. In the calculator code, it is possible to estimate a wage adjustment factor from the inputs as example, $wages*( S1*1.+S2*0.5+S3*.333+S4*.5)/(S1+S2+S3+S4). Alternately, some logic statements could select either $wages*1. and/or $wages*0.5, summing totals for mixed crews. Aside from the mixed wages, the modern auditor (plus 4000 years later) has to check the time-off factor for mixed crews (eg. 1/5, 1/6, 1/7.75, or 1/10 different rates seen in texts).


Pseudocode and Equations

  Sumerian price in silver = [/ liters 300.]
  Sumerian price in liters grain = [* silver 300.] 
  # 1 silver piece = 1 gur = 300 liters of grain
  liters = [* volume_in_cubic_cm .001]
  price? = raw materials + labor  +  profit
  price? = raw materials + heat process
  price? = raw materials + labor 
  average price per unit  = revenue  / units sold

Testcases Section


In planning any software, it is advisable to gather a number of testcases to check the results of the program. The math for the testcases can be checked by pasting statements in the TCL console. Aside from the TCL calculator display, when one presses the report button on the calculator, one will have console show access to the capacity functions (subroutines).


Testcase 1

table 1printed in tcl wiki format
quantity value comment, if any
testcase number: 1
3.5 :men (guru) 3.5
0.0 :women (geme) 0.0
0.0 :working children (dumu)0.0
0.0 : old workers (sugi) 0.0
30.0 : days time period30.0
105.0 : workdays on books105.0
210.0 : rations (liters) 210.0
0.700 : silver pieces0.700

table 2printed in tcl wiki format
quantity value comment, if any
testcase number: 2
0.0 :men (guru) 0.0
10.0 :women (geme) 10.0
0.0 :working children (dumu)0.0
0.0 : old workers (sugi) 0.0
30.0 : days time period30.0
300.0 : workdays on books300.0
600.0 : rations (liters) 600.0
2.0 : silver pieces2.0

table 3printed in tcl wiki format
quantity value comment, if any
testcase number: 3
0.0 :men (guru) 0.0
0.0 :women (geme) 0.0
5.0 :working children (dumu)5.0
0.0 : old workers (sugi) 0.0
30.0 : days time period30.0
45.0 : workdays on books45.0
90.0 : rations (liters) 90.0
0.30 : silver pieces0.300

table 1printed in tcl wiki format
quantity value comment, if any
testcase number: 1
40.0 :men (guru) 40.0
0.0 :women (geme) 0.0
0.0 :working children (dumu)0.0
0.0 : old workers (sugi), disabled 0.0
60.0 : days time period60.0
2400.0 : workdays on books2400.0
55.0 : bala service days rounded55.0
240.0 : timeoff males if all males, rounded240.0
400.0 : timeoff females if all females400.0
0.999 : wage adjust factor for mixed crews 0.999
2345.0 : workdays adjusted less bala etc2345.0
4690.0 : rations (liters) 4690.0
15.633 : silver pieces15.633

Testcase 2

table 2printed in tcl wiki format
quantity value comment, if any
testcase number: 2
0.0 :men (guru) 0.0
30.0 :women (geme) 30.0
0.0 :working children (dumu)0.0
0.0 : old workers (sugi), disabled 0.0
30.0 : days time period30.0
900.0 : workdays on books900.0
20.0 : bala service days rounded20.0
90.0 : timeoff males if all males, rounded90.0
150.0 : timeoff females if all females150.0
0.499 : wage adjust factor for mixed crews 0.499
880.0 : workdays adjusted less bala etc880.0
879.999 : rations (liters) 879.999
2.933 : silver pieces2.933

Testcase 3

table 3printed in tcl wiki format
quantity value comment, if any
testcase number: 3
40.0 :men (guru) 40.0
0.0 :women (geme) 0.0
5.0 :working children (dumu)5.0
6.0 : old workers (sugi) or disabled 6.0
390.0 : days time period390.0
17355.0 : workdays on books17355.0
404.0 : bala service days rounded404.0
1735.0 : timeoff males if all males, rounded1735.0
2892.5 : timeoff females if all females2892.5
0.892 : wage adjust factor for mixed crews 0.892
16951.0 : workdays adjusted less bala etc16951.0
30245.901 : rations (liters) 30245.901
100.819 : silver pieces100.819


References:

  • Robert Englund, UCLA [L1 ]
  • Ur III Tablets in the Valdosta State University, search on cdli
  • Cuneiform Digital Library Journal, search on Equivalency Values
  • Ur III Equivalency Values[L2 ]
  • Especially, the Ur III Equivalency Values and library texts for workday (u4) keyword.
  • The Sumerian keywords search on the cdli
  • are very effective, but major size files to download

Appendix Code

appendix TCL programs and scripts

        # pretty print from autoindent and ased editor
        # Sumerian time & accounting calculator
        # written on Windows XP on eTCL
        # working under TCL version 8.5.6 and eTCL 1.0.1
        # gold on TCL WIKI, 15sep2014
        # comment follows from gold, 12Dec2018
        # pretty print from autoindent and ased editor
        # Sumerian Time & Accounting Calculator V2
        # written on Windows XP on TCL
        # working under TCL version 8.6
        # Revamping older program from 2014.
        package require Tk
        namespace path {::tcl::mathop ::tcl::mathfunc}
        frame .frame -relief flat -bg aquamarine4
        pack .frame -side top -fill y -anchor center
        set names {{} {men (guru):} }
        lappend names {women  (geme):}
        lappend names {children working (dumu): }
        lappend names {old (sugi) or disabled:}
        lappend names {accounting period days (typical 30 days) :}
        lappend names {workdays on books : }
        lappend names {grain rations (liters) : }
        lappend names {value in silver :}
        foreach i {1 2 3 4 5 6 7 8} {
            label .frame.label$i -text [lindex $names $i] -anchor e
            entry .frame.entry$i -width 35 -textvariable side$i
            grid .frame.label$i .frame.entry$i -sticky ew -pady 2 -padx 1 }
        proc about {} {
            set msg "Sumerian Time & Accounting Calculator V2
            from TCL ,
            # gold on  TCL Club, 12Dec2018 "
            tk_messageBox -title "About" -message $msg }
        proc self_help {} {
            set msg " Sumerian Time & Accounting V2
            from TCL Club ,
            # self help listing
            # problem, Sumerian Time & Accounting V2
            # 3 givens follow.
            1) length meters:
            2) width meters:
            3) coefficient:
            # Recommended procedure is push testcase
            # and fill frame,
            # change first three entries etc, push solve,
            # and then push report.
            # Report allows copy and paste
            # from console to conventional texteditor.
            # For testcases, testcase number is internal
            # to the calculator and will not be printed
            # until the report button is pushed
            # for the current result numbers.
            # >>> copyright notice <<<
            # This posting, screenshots, and TCL source code is
            # copyrighted under the TCL/TK license terms.
            # Editorial rights and disclaimers
            # retained under the TCL/TK license terms
            # and will be defended as necessary in court.
            Conventional text editor formulas
            or  formulas grabbed from internet
            screens can be pasted into green console.
            # gold on  TCL Club, 12Dec2018 "
            tk_messageBox -title "Self_Help" -message $msg }
        proc calculate {     } {
            global answer2
            global side1 side2 side3 side4 side5
            global side6 side7 side8
            global testcase_number
            incr testcase_number
            set side1 [* $side1 1. ]
            set side2 [* $side2 1. ]
            set side3 [* $side3 1. ]
            set side4 [* $side4 1. ]
            set side5 [* $side5 1. ]
            set total1 [* $side1 $side5 1. ]
            set total1 [+ $total1 [* $side2 $side5 1.] ]
            set total1 [+ $total1 [* $side3 $side5 .3] ]
            set total1 [+ $total1 [* $side4 $side5 .5] ]
            set side6 $total1
            set side7 [* $side6 2. ]
            set side8 [* $side7  [/ 1. 300.]  ]  }
        proc fillup {aa bb cc dd ee ff gg hh} {
            .frame.entry1 insert 0 "$aa"
            .frame.entry2 insert 0 "$bb"
            .frame.entry3 insert 0 "$cc"
            .frame.entry4 insert 0 "$dd"
            .frame.entry5 insert 0 "$ee"
            .frame.entry6 insert 0 "$ff"
            .frame.entry7 insert 0 "$gg"
            .frame.entry8 insert 0 "$hh"
        }
        proc clearx {} {
            foreach i {1 2 3 4 5 6 7 8 } {
                .frame.entry$i delete 0 end } }
        proc reportx {} {
            global side1 side2 side3 side4 side5
            global side6 side7 side8
            global testcase_number
            console eval {.console config -bg palegreen}
            console eval {.console config -font {fixed 20 bold}}
            console eval {wm geometry . 40x20}
            console eval {wm title . " Oil Molecule Calculator V2 Report, screen grab and paste from console 2 to texteditor"}
            console eval {. configure -background orange -highlightcolor brown -relief raised -border 30}
            console show;
            puts "%|table $testcase_number|printed in| tcl wiki format|% "
            puts "&| quantity| value| comment, if any|& "
            puts "&| testcase number:| | $testcase_number|&"
            puts "&| $side1 :|men (guru)| $side1 |&"
            puts "&| $side2 :|women (geme)| $side2|& "
            puts "&| $side3 :|working children (dumu)|$side3|& "
            puts "&| $side4 :| old workers (sugi) |$side4 |&"
            puts "&| $side5  :| days time period|$side5 |&"
            puts "&| $side6  :| workdays on books|$side6 |&"
            puts "&| $side7  :| rations (liters) |$side7 |&"
            puts "&| $side8  :| silver pieces|$side8 |&"
        }
        frame .buttons -bg aquamarine4
        ::ttk::button .calculator -text "Solve" -command { calculate   }
        ::ttk::button .test2 -text "Testcase1" -command {clearx;fillup 3.5 0.0 0.0 0.0  30. 105.0 210.0 0.7}
        ::ttk::button .test3 -text "Testcase2" -command {clearx;fillup 0.0 10.0 0.0 0.0  30. 300. 600. 2. }
        ::ttk::button .test4 -text "Testcase3" -command {clearx;fillup 0.00 0.0 5.0 0.0  30.0 45.0 90.00 0.3 }
        ::ttk::button .clearallx -text clear -command {clearx }
        ::ttk::button .about -text about -command about
        ::ttk::button .self_help -text self_help -command { self_help }
        ::ttk::button .cons -text report -command { reportx }
        ::ttk::button .exit -text exit -command {exit}
        pack .calculator  -in .buttons -side top -padx 10 -pady 5
        pack  .clearallx .cons .self_help .about .exit .test4 .test3 .test2   -side bottom -in .buttons
        grid .frame .buttons -sticky ns -pady {0 10}
        . configure -background aquamarine4 -highlightcolor brown -relief raised -border 30
        wm title . "Sumerian Time & Accounting  Calculator V2 "

Pushbutton Operation

For the push buttons, the recommended procedure is push testcase and fill frame, change first three entries etc, push solve, and then push report. Report allows copy and paste from console.

For testcases in a computer session, the eTCL calculator increments a new testcase number internally, eg. TC(1), TC(2) , TC(3) , TC(N). The testcase number is internal to the calculator and will not be printed until the report button is pushed for the current result numbers. The current result numbers will be cleared on the next solve button. The command { calculate; reportx } or { calculate ; reportx; clearx } can be added or changed to report automatically. Another wrinkle would be to print out the current text, delimiters, and numbers in a TCL wiki style table as

  puts " %| testcase $testcase_number | value| units |comment |%"
  puts " &| volume| $volume| cubic meters |based on length $side1 and width $side2   |&"  

Hidden Comments Section


Please place any comments here with your wiki MONIKER and date, Thanks.gold12Dec2018