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 in your comment with the same courtesy that I will give you. Its very hard to reply intelligibly without some background of the correspondent. Thanks,gold
gold Here is some eTCL starter code for calculating materials and workday quotas of ancient Sumerian weavers. The impetus for these calculations was checking garment weights in some cuneiform texts and modern replicas. Most of the testcases involve replicas or models, using assumptions and rules of thumb.
One tablet cites 7 tug2-sagusbar garments weighing 25 manas of wool and 4 small tug2-didila garments weighing 12+1/3 manas of wool. A mana is equivalent to 0.4977 kilograms or 497.7 grams. Using proportions, one finds 25 manas/ 7 sagusbar garments or 3.5714 mana per sagusbar garments. For the small garments (12 + 1/3)/ 4 small tugdidila garments or 3.0833 mana per tugdidila. At least on this tablet, the individual garments weight from 3.08 to 3.57 mannas, converting to (3.08*0.4977) and (3.57*0.4977) kilograms. The cited individual garments weight from 1.53 kg to 1.777 kilograms.
Another tablet cites 3 tug2-sagusbar garments as a daily quota. That is, a weaver processes about 3*3.5714, 10.714 manas a day, or 5.332 kilograms of wool per day. Since there are other types of garments listed as daily quotas or weights of cloth, this key allows a provisional scheme to assess garments relative to the weaver's workday and weight of wool.
Now the workday equivalent for the woolen goods can be found. The workdays for the weaver was 7 tug2-sagusbar garments times 0.314 workday plus 4 tug2-didila garments times 1.53 workday, 2.198 + 1.132, or roughly 3.3 workdays.
The loom quota was possibly 2 square meters of tug cloth per day. Also found a math problem that one woman wove length of cloth for 4 cubits or 2 meters in a day, presumably on a loom. The width of the loom was not stated. Given all the assumptions, the daily quota off the loom was 2. m*m, 2. by 1. meters, or 4 cubits by 2 cubit. Another tentative equivalent was a weaver spins 10.714 manas a day, or 5.332 kilograms of wool per day. The surface area per weight would be 2.0 / 5.333 or 0.375 square meters per kilogram.
Another approach to find the weavers quota in terms of garment surface area per day is to examine the daily quotas for the reed mat weavers, reed basket weavers, and straw basket weavers. In the Sumerian coefficient lists on clay tablets, there are coefficients which were used in determining the daily work quotas of the workers. In most cases, the math problem is how the coefficient was used in estimating materials and daily work quotas. One difficulty is determining the effective power of the coefficient in base 60. For example, 20 could represent either 20*3600,20,20/60, 20/3600, or even 1/20. Thanks to several excellent papers, the daily quotas for the basket weavers and straw are better understood than the daily quotas for garment weavers. The reed daily quota was 4_48, 4+48/3600,288/3600 sar, which converts to 2.88 square meters per workday. The second reed daily quota was 3_45, 3+45/3600,225/3600 sar, which converts to 2.25 square meters per workday. The straw daily quota was 3_36, 3+36/3600,216/3600 sar, which converts to 2.16 square meters per workday. The reed and straw quotas were on the order of 2 to 3 square meters per workday.
In occasional texts, individuals received wool rations or wool payments. Variety of payments would be high status (4 mannas), women weavers or other craftsmen ( typically 3 to 3.5 manas), hired men or women (2). In some cases, the wool ration was listed with other workers receiving yearly clothing allowance, but other occasions seemed to be a perk of a high status job, even foremen of construction jobs (3-4 mannas). At least for the women weavers and craftswomen, the wool ration of 3 mannas was close to nomimal amount required for the female garment or long skirt. One tablet indicated some wool rations distributed to a number of women etc on the 12th month. Presumably, the wool rations were distributed and woven before the Aditu festival in the first month of the year.
For the low status men, the wool ration of 2 manas was probably enough to furnish a lam cloak and a loincloth. The fourth class lam cloak was about 2 manas in weight. The research could not find an overt Sumerian text on weight of loincloths, but there are garments listed as "tug2usz-bar ge6 42 tug2 u4" which were small cloths made as 42 items per day. The Nippur lexical list etc notes candidates as tug2-nin-nes (cloth loincloth ), tug2-ib-pes (thick hip garment), tug2-nin-dara ( sash), nín-dara-gala-sír-ra: ( woman napkin) and tug2-bar-si ( sash). At Ur, the tug2 sag usz-bar 38 tug2 per u4 was 38 per workday. Using proportions, the weight of the loincloth would be 5.4 /42 or 0.129 kilograms or 0.254 manas. Cdli 2009-2 showed two prisoners provided with tug2-u-ge8 black "u" garments and probably not luxury clothing, so perhaps a tug2-u-ge8 garment is a black loincloth. Black (ge8) is interesting wrinkle, whether natural or dyed black wool. Perhaps tug2-u-ge8 and tug2-usz-bar ge6 are nearly the same item, a black wool loincloth.
In the accounting texts, there are tallies of shepherds and overseers turning in amounts of wool. Usually these texts tell the amount of wool in manas and the exchange value in silver pieces or other products. A silver shekel bought 9 to 12 mannas of wool or 30 to 40 manas of goat hair. Each sheep or goat provided roughly 2 manas (~ 1 kg) of wool or hair. For comparison, modern sheep like the Merino produce 8-12 kilograms of wool.
In the the URIII accounts, there are terms for wool (siki) and grades of lesser quality wool which were rated in silver values. The value of wool has been estimated to range from 9 to 13 manas weight for one shekel of silver. Reasonably, a silver shekel would purchase more weight of the lower grade wool (say 10 to 13 manas). While some tablets in the CLDI library have broken pieces, faint words, and abbreviated terms, one can run a search in the CLDI library and pull out instances of lesser quality wool (siki mug-bi), meaning positive occurances (and overt lower prices) of mug-bi as opposed to plain siki alone. The understanding has been that siki-mug contained more short hairs than regular wool. It is known that some wool was salvaged from carcases, and may have been rotten or undesirable.
There are different qualities associated with wool in the text, including siki mug (poor quality wool). Elaborating, siki mug is a low quality wool with short and broken wool fibers (also mug, muk,mu, Akk. mukku). In the CDLI equivalencies list, there is a garment tug2nig2-lam2 du (cloth_item cloak built felt?) which has a daily quota of two workdays. The term "du" in context with cloth is usually associated with felt. For example in the Nippur lexical lists, there are clothing terms tug du ( cloth felt), tug guzza du (cloth neck wrap felt shirt?), and tug du-a-ibiba ( cloth felt belt ). One text has tug2 [nig2]-lam2 du [siki mug-bi x] 5/6(disz) ma-na [n] 1/2(disz) gin2 . The text assigns the lam2 cloak with a weight of 5/6 mana and 1/2*(1/60) mana, 0.8416 mana, or 0.4188 kilograms. Most of the felt production in published texts were high class garments and many workdays, which are difficult to evaluate in terms of simple felt cloth production. As a first cut and combining the information, the production rate was roughly 5.3 kilograms of felt cloth per workday, similar to the weaver production rate.
Another Sumerian textile term was siki za-ri-in (poor quality wool). In the CDLI library, there were 31 instances of combined siki, za-ri-in, or za-ri-in-bi, mainly in URIII accounts or inventories. The "-bi" is third person genitive that was used in the equivalency formulas and here was used not as noun<3ird-p-genitive but as noun<adjective<3ird-p-genitive. Normally, the "-bi" construct acts on the same or a preceding line in the tablet. In the za-ri-in searches on the CDLI library, there were "-bi" constructs that appeared to act on more than one preceding line. "siki za-ri-in -bi " (its poor quality wool) was occasionally used as an equivalency to give numbers of garments and the equivalent weight in manas of poor quality. There were other instances where a tablet line would give weights of siki za-ri-in and the type or number of garments ( possible equivalency statements, but not using the "-bi" construct). Tentatively, it appears that either these garments were being salvaged or reworked for the wool content or were included in inventories as poor quality wool.
Tablet KVM 32.1182 was published in CDLI 2007-001 and was especially fruitful in giving weights of garments and textiles during URIII. From the more legible entries on KVM 32.1182, the average weight of Sumerian cloaks and robes can be tallied. The tug2-lam cloak was found to weight 8 for 10+7+2/3+3*(1/60) manas, which gives 32.716/8 or 2.214 manas. The tug2-uz-bar garment was found to weight 4 for 10+5+10/60*1/60 manas, which gives 15.0/4 or 3.75 manas. The tug2-guz-za-du felt garment was found to weight 4 for 20+1+1/3 manas, which gives 21.333/4 or 5.333 manas. The tug2-guz-za woven garment was found to weight 6 for 32+5/6+5/6*1/60 manas, which gives 32.847/6 or 5.474 manas. In other documents, the workdays are given for tug2-guz-za etc of high status garments, which are difficult to break down in terms of workdays spent on a mass of wool. Also, it is not established whether the workdays for the garments include all the tasks of washing, carding, spinning, dyeing, and weaving.
The base 60 numbers in the Sumerian texts are tricky to read correctly, so it is desirable to cross check magnitudes (in the eTCL calculator) with some replica loom results. The results of carding wool, spinning wool and weaving a fabric on a replica vertical loom were converted into metric kg units and the Sumerian workday (12 hours long). The wool was washed prior to spinning yarn and lost about 6.7 percent weight in washing. After washing, approximately 66 grams of wool were carded and combed after 9 hours. Converting to 12 hour workday, the rate of carding wool was 88 grams per workday. From the replica weavers, here are some average figures for spinning yarn converted to the 12 Sumerian workday: 22.39 grams spinning yarn per workday, 27. grams per workday, and 24.7 grams per workday. On the available yarn records for the replica loom, the total yarn weight was 31.1 grams and yarn length was 515.3 meters length. The wool fabric left on the loom was 0.24 meters by 0.07 meters. That is, the loom weights with the vertical warf threads were spaced over an interval of 0.24 meters and the weavers travel down the loom (with the shuttle) was 0.07 meters. The replica wool fabric was noticeably thin and transparent, but probably would qualify for a light weave like gauze. For the replica fabric, the surface area over weight was roughly 0.24 m* 0.07m/.0311 kilograms or 0.540 sq meters per kilogram. For comparison with the Sumerian woolen garments in the texts, the calculator is reporting a typical surface area density of rounded 0.4 sq meters per kilogram. (The above notes do not assert that vertical looms were used at UrIII and earlier, only the wool preparation processes and fabric density are compatible with the texts.)
Here's an example on how the eTCL weaver calculator might work in analysis of Sumerian clothing. The eTCL calculator can be used to estimate the expected weights of lam cloaks. The Sumerian tug2.lam cloak is well known from the Nippur lexical lists etc. In the current CDLI equivalency list (2014), there are two lines that cite either 10 tug2.lam cloaks per workday or 5 tug2.lam cloaks per workday ( an unreasonable disparity). After loading both 1/10 or 1/5 days into the eTCL calculator, the 1/10 workday leads to a calculation of 0.54 kg and the 1/5 workday leads to a calculation of 1.08 kg. From other texts, the typical lam cloak weighs from 1.00 kg to 1.068 kg. Elaborating, the lam cloak of the fourth class weighs about 1.00 kg and the lam cloak of the third class weighs about 1.068 kg. Since the Sumerians usually weighed wool to units of 1/60 mana or 0.008 kg, the significant figures of the kg weights are close to correct. So the figure of 10 tug2.lam cloaks per workday is suspect. The figure of 5 tug2.lam cloaks per workday and a weight of 1 kg to 1.068 kg is more compatible with the other texts on lam classes 4 and 3.
Continuing with using the eTCL calculator on lam cloaks, if one finds a lam cloak that weighs more than expected, then one can game on the eTCL calculator to estimate the workdays of the garment. Some of the lam cloaks average 1.3 kg from tablet KVM 32.1182, possibly garments for higher status. On successive calculations, enter the time series 0.2,0.21,0.22,0.23,0.24,0.25 for workdays in the eTCL calculator. A garment of 1.3 kg would take between 0.24 and 0.25 workdays for the weaver to complete. In terms of the URIII equivalency lists, the quota for the weaver might be 1/0.25 or 4 heavier lam cloaks per workday. The lam cloaks of 1.3 kg weight have the term zi-zi (cut? and cut?) as a line postscript.
Another interesting use of the Sumerian texts and the eTCL calculator is gaining insight on the Sumerian transportation system. As outlined in Englund's Command Economy, the Sumerians normally transported dry goods by porters or canal tow boats in large reed baskets . The standard transportation loads were 30 manas (1/2 man load), 60 manas (full man load) , or 90 manas (burro or ship) and usually packed into large baskets. The basket sizes were broken down into 30 liter, 60 liter, and 90 liter. In the Cdli tablet library, there is the line cdliatf20130330 1. 2(disz) tug2-mah siki gid2-bi 5(disz) ninda, which gives the length of 2 great rolls of wool cloth as total 5 nindas or 30 meters. The width was not given, but was probably one meter. With assumptions, the total surface area was L*W, 30*1, or 30 square meters. The total tug2 cloth appears close to a regular Sumerian standard, 30/32 or 94 percent of a sar (32 sqm). The total weight was estimated as 30/.375, 80 kg, or 160.7 manas. In modern terms, the cloth bolt was 80/2 or 40 kilograms. Each tug2.mah (cloth bolt?) was 160.7/2 or ~80 manas, just short of a standard 90 mana load. With spare packaging and a 90 liter reed basket weighing at least 4 manas, the tug2.mah was pretty close to the 90 mana standard. For the eTCL calculator, set the workday initially at 1 and see one workday's wool as 5.4 kg. Load an initial estimate on the workdays as 40/5.4 or 7.4 workdays, push solve, and the gamed answer should be about 7.5 workdays of weaver labor. The calulator estimates the tug2.mah would use about 20 kg of madder dye, 220 kg of cleaning alkaline, 160 kg of cleaning oil, and cost 0.25 silver shekels in weaver labor. The 7.5 days of labor on the cloth bolt is close to a modern 7-day week. However, the Sumerians used a lunar calendar of 30 day months and the 7.5 days is more an artifact of 30/2/2 days, used in Sumerian accounts. Note the weaver labor for two rolls is another regular unit of 15 days (2*7.5 days equals 30/2 days).
Continuing with examples from the Sumerian transportation system, some tablets include inventories of standard packs of wool (or clothes) including lam du (felt cloaks), guzza du (felt neck wraps long shirts?), siki kur-ra tug usz-bar ( sashes of foreign wool), and siki ge usz-bar (sashes of black? wool). The tallies have units of 4*60+2 manas, or 462 manas. These big pack items and others listed appear rated as grades of wool, perhaps shipments of wool delivered to the weavers as suitable wool for the named line items. Making assumptions, the wool shipments to (and from) the weavers would be aligned with the standard loads of the Sumerian transport, namely 30 manas (1/2 manload), 60 manas (manload), 90 manas ( burro load?). At least some of the inventory tallies appear to be multiples of a manload of wool. Using the conversion units, a nominal manload would be 60 manas or 60*.4799, 28.8 kg. For the eTCL calculator, set the workday initially at 1 and load an initial estimate on the workdays as 28.8/5.4 or 5.3 days for the weaver. The calculator estimated the weaver labor in the 28.8 kg pack as 0.18 silver piece. While the quantities of madder root, cleaning alkaline, and cleaning oil are just hypothetical estimates, the Sumerian texts identify industrial goods transported by porter and ship, although not always the consumer.
The modern dyer using natural dyes like red madder and yellow safflower has to make the same calculations as the ancient Sumerians. However, the modern terminology is different. The natural dyes are rated as percentage of weight of form, which is a measure of dye strength. The calculation for the required weight of dye is weight of cloth times the weight of form coefficient. For example in the eTCL calculator, the calculated mass of the garment (1.8 kg) is multiplied by the weight of form for red madder (50 %) to get the required dye 1.8*(50/100), or 0.9 kg.
garments | Ur III | ||||
---|---|---|---|---|---|
quantity | values | units | decimal workdays | units | comment |
tug2-sagusbar | 1.7 | kilograms | 0.314 | workdays | |
tug2-didila | 1.53 | kilograms | 0.283 | workdays | |
total garments | 3.23 | kilograms | 3.3 | workdays |
Sumerian coefficients for daily work rate, etc | |||||
---|---|---|---|---|---|
daily work of one man etc in base 60 | transliterated name | english | decimal /fraction | reciprocal | comment |
12 | u4, u4-1-se | hours of workday | 12 | 1/12 | 12 hours, common to several accounts and math problems |
48 | igigub sig2 hi.a | coefficient wool | 48/60 | 60/48 | possibly daily rate of loom, conv to (48/60)*6, 4.8 meters length |
40 | igigub sig2 hi.a | coefficient wool | 40/60 | 60/40 | possibly daily rate of loom, conv to (40/60)*6, 4.0 meters length of spun wool |
6 | tug2-gurx(SZE.KIN) | poss. daily weaver quota | 6/60 | 60/6 | 6 surface sar shekels, poss. 3.2 sq. meters, found on tablet |
10 | siki ku-bi-se | price of sheep wool | 10/60 | 60/10 | one silver shekel buys 10 manas of sheep wool, used in state accounting |
30 | siki-ud ku-bi-se? | price of goat hair | 30/60 | 60/30 | one silver shekel buys 30 to 40 manas of goat hair, used in state accounting |
1/60 | siki-se? | fraction of mana | 1/60 | 60/1 | 1/60 mana, 9 grams or 0.009 kg, smallest fraction weighing wool, used in craftsmen receipts |
6 | u4 | 6 days for tug2 lam lugal (princely) | 6 | 1/6 | 6 days for tug2 lam , used in craftsmen receipts |
2+nnn | lamhusu third class | (8+1/2+5/60)/4 mannas, 2.1458 | 1.0678 kg | workdays | ||
2 | lamhusu fourth class | 2 mana | 1 kg | workdays | ||
42 | tug2usz-bar ge6 42 tug2 per u4 ? | 42 woven items per day | 42 | 1/42 | 42 small items per day, used in state accounting | |
15 | tug2guz-za du 15 u4 per tug2 ? | 15 day | 15 | 1/15 | 15 days per high status tug2-guz-za robe , used in state accounting | |
4 | tug2ba-tab-duh-hu-um us2 4 u4 per tug2 ? | 4 day per item | 4 | 1/4 | 4 days per high status tug2-tab-duh robe , used in state accounting | |
2 | tug2ba-tab-duh-hu-um us2 4 u4 per tug2 ? | 2 day per item | 2 | 1/2 | 2 days per high status tug2-gazza robe , used in state accounting | |
7 | 7.5 workdays per kilogram at fuller shop? | 7 days per item | 7 | 1/7 | 7+30/60 workdays per kilogram of cloth at fullers shop, estimated from tables | |
3 | sig-bar | wool ration lit. hair division | 3 | 1/3 | variants sig-bar,sig-ba,tug2-ba are various wool rations or payments from 2,3,4 manas, used in state accounting | |
3 | tug2 NIG2.SAG.LAL.MUNUS nin | cloth_item head drapery female for the goddess | 3 | 1/3 | 3 workdays spent on headdress for cultic statue?, used in state accounting | |
90 | tug2 guz-za du | cloth_item neck wrap built felt? | 90 | 1/90 | 90 workdays spent on neck wrap shirt?, high status garment, used in state accounting | |
1080 | tug2bar-dul5 gada lugal | cloth_item long gown linen princely | 1080 | 1/1080 | 1080 workdays spent on princely gown, used in state accounting | |
10 | tug2guz-za 4-kam us2 sur-ra | cloth_item neck wrap shirt? precious | 10 | 1/10 | 10 workdays spent on neck wrap, used in state accounting | |
42 | tug2usz-bar ge6 | cloth_item length middle wrap belt, sash? | 42 | 1/42 | one workday spent on 42 small cloth_items , used in state accounting | |
3? | tug-ku-ru-um | cloth_item morningkuuru=grief | 3? | 1/3 | (20/60?) workday spent on morning garb, need more examples | |
2 | tug2nig2-lam2 du | cloth_item cloak built felt? | 2 | 1/2 | two workdays spent on cloak, used in state accounting, "du" usually associated with felt | |
4 | tug2ba-tab-duh-hu-um | cloth_item ration grasp loosened joy?celebration gown, cloak? | 4 | 1/4 | 4 workdays spent on cloth_item, used in state accounting |
Sumerian colored garments/agents | English | possible agent |
---|---|---|
tug2-bar-si-hus | a red sash | |
tug2-gu-e sig7-sig7 | green shawl | |
tug2-bar-dul hus | a red garment, full-body garment | |
tug2gu-e gun | a multi-colored shawl | |
an-ta-dul | cloak | |
tug2-im-su-a cloth | cloth treated with red clay | red clay |
tug2 im-babbar-ra | whitened cloth, treated with gypsum | effectively, gypsum bleach |
tug2-nin-lam hus | a red ceremonial garment | |
tug2-u-ge6 | a black garment | natural? black wool , ku10, 'black' ? or kul, |
most color/dye terms known from later cultures and eras, after 1200BCE | dub, verb. to dye fabrics | |
síg-babbar | white wool (lit. white hair) | natural? white wool or gypsum bleached |
im-pa-mun | dark clay used to color clothes | black or brown clay? |
ni-ik-tum | poss. dye plant | associated with UrIII, ref. Akk.niqdu |
sig-ge6 | black wool | associated with garments in UrIII |
pus-a | something red | no examples of association |
hus | something red | associated with garments in Nippur Lex. |
sig7-sig7 | something yellow or green | associated with garments in Nippur Lex. |
za-gin | something blue | associated with lapis lazuli stone |
sig za-gin-ge6 | blue purple wool | Neo-Assyrian & Ugarit, associated with garments |
sig za-gin-sa | red purple wool | Neo-Assyrian & Ugarit, associated with garments |
sig za-gin | generic purple wool | Neo-Assyrian & Ugarit, associated with garments |
gun | something multicolored | associated with garments in Nippur Lex. |
Pseudocode with some Equations | |
---|---|
namespace path {::tcl::mathop ::tcl::mathfunc} | |
pseudocode: answer is mandays of labor or silver pieces +- error | |
one mana of wool took 4 measures (mannas?) of alkali | |
one mana of wool took 5.5 measures (5.5*2*sila?) of oil | |
one kilogram of wool took 4 measures (kg?) of alkali | |
one kilogram of wool took 5.5 measures (liters?) of oil | |
surface density = surface area / weight |
red madder kilograms = mass of cloth * (50/100) madder weight of form red brazilwood kg = mass of cloth * (50/100) brazilwood weight of form brown acaciawood kg = mass of cloth * (20/100) acaciawood weight of form brown henna kg = mass of cloth * (50/100) henna weight of form purple borage kg = mass of cloth * (75/100) borage weight of form alum kilograms = mass of cloth * (15/100) alum weight of form Sumerian alum constant (sa na-sur-ra foreign salt) = 20?, may be 20/60 or 34/100 akaline kilograms = mass of cloth * (4.5) cuneiform alkaline constant cleaning oil kilograms = mass of cloth * (5.5) cuneiform oil constant about 6.7 percent weight loss in cleaning raw wool kilograms = mass of cloth * (6.7/100.) modern estimate cleaning raw wool workday quota of making reed mats = 0.625 sq meters reed quota approximates 0.625/18, 2/60 fraction of surface sar 2*.4977 1. sq meters price? = raw materials + labor + profits price? = raw materials + heat process price? = raw materials + labor
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).
tug2-sagusbar | table printed in tcl wiki format | |
---|---|---|
quanity | value | comment, if any |
testcase number | 1 | |
workday for one garment | .333 | |
wool kilograms | 1.798 | |
surface area | 0.5994 | |
madder dye kilograms | 0.8 | |
cleaning oil liters: | 9.890 | |
cleaning alkaline kilograms: | 7.192 | |
price of labor in silver: | 0.0111 | |
price of labor in grain liters | 1.798 |
tug2-didila | table printed in tcl wiki format | |
---|---|---|
quanity | value | comment, if any |
testcase number | 2 | |
workday for one garment | .25 | |
wool kilograms | 1.35 | |
surface area | 0.45 | |
madder dye kilograms | 0.65 | |
cleaning oil liters: | 7.425 | |
cleaning alkaline kilograms: | 5.4 | |
price of labor in silver: | 0.00833 | |
price of labor in grain liters | 1.35 |
weaver output of one day | table printed intcl wiki format | |
---|---|---|
quanity | value | comment, if any |
testcase number | 3 | |
workday for one garment | 1. | |
wool kilograms | 5.4 | |
surface area | 1.8 | |
madder dye kilograms | 2.7 | |
cleaning oil liters: | 29.700 | |
cleaning alkaline kilograms: | 21.6 | |
price of labor in silver: | 0.0333 | |
price of labor in grain liters | 2 |
# pretty print from autoindent and ased editor # Sumerian weaver calculator # written on Windows XP on eTCL # working under TCL version 8.5.6 and eTCL 1.0.1 # gold on TCL WIKI , 9apr2014 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 {{} {workdays for garment:} } lappend names {dyestuff percentage %:} lappend names {answers: wool kilograms : } lappend names {madder dye kilograms: } lappend names {cleaning akaline kilograms:} lappend names {cleaning oil liters:} lappend names {price of labor in silver: } foreach i {1 2 3 4 5 6 7} { 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 pi {} { expr acos(-1) } proc about {} { set msg "Calculator for Sumerian weaver from TCL WIKI, written on eTCL " tk_messageBox -title "About" -message $msg } proc calculate { } { global answer2 global side1 side2 side3 side4 side5 global side6 side7 testcase_number global workday woolkg surfacearea global madder oilcl alkaline dyestuff global silverxpr grainxpr cloaklength incr testcase_number set workday $side1 set woolkg [* $side1 5.4] set dyestuff $side2 set side3 $woolkg set surfacearea [* $woolkg [/ 1.99 5.333 ]] set sa $surfacearea set side4 [* $woolkg [/ $dyestuff 100.]] set side5 [* $woolkg 5.5] set side6 [* $woolkg 4.] set madder [* $woolkg .5] set oilcl [* $woolkg 5.5] set alkaline [* $woolkg 4.] set grainxpr [* $woolkg 1.] set cloaklength [/ [sqrt [/ [* 4. $sa] [pi]]] 2.] set side7 [* $workday [/ 1. 30. ]] set silverxpr $side7 } proc fillup {aa bb cc dd ee ff gg} { .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"} proc clearx {} { foreach i {1 2 3 4 5 6 7} { .frame.entry$i delete 0 end } } proc reportx {} { global side1 side2 side3 side4 side5 global side6 side7 testcase_number global workday woolkg surfacearea global madder oilcl alkaline dyestuff global silverxpr grainxpr cloaklength console show; puts "%|table printed in| tcl wiki format|% " puts "&|quanity| value| comment, if any|& " puts "&|testcase number| $testcase_number||& " puts "&| workday for one garment | $side1 ||&" puts "&|dyestuff percentage % | $side2||& " puts "&|wool kilograms| $side3||& " puts "&|madder dye kilograms| $side4 ||&" puts "&|cleaning oil liters:| $side5||& " puts "&|cleaning alkaline kilograms:| $side6 ||&" puts "&|price of labor in silver:| $side7 ||&" puts "&|price of labor in grain liters| $grainxpr ||& " puts "&|cloak length in meters:|$cloaklength||&" puts "&|surface area in meters:|$surfacearea||&" } frame .buttons -bg aquamarine4 ::ttk::button .calculator -text "Solve" -command { calculate } ::ttk::button .test2 -text "Testcase1" -command {clearx;fillup .333 50. 0.6 .9 9.8 7.2 .01 } ::ttk::button .test3 -text "Testcase2" -command {clearx;fillup .25 50. 0.45 .7 7.4 5.4 .008 } ::ttk::button .test4 -text "Testcase3" -command {clearx;fillup 1. 50. 1.8 2.7 29.7 21.6 .03} ::ttk::button .clearallx -text clear -command {clearx } ::ttk::button .about -text about -command about ::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 .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 Weaver Calculator "
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, but takes away from computer "efficiency".
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 (which 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, but is not recommended as computer efficiency is impaired. 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 |&"
Please place any comments here, Thanks.
AMG: Please remember that for wiki formatting, any text in [brackets] needs to have those brackets doubled up ("[[" and "]]]"), or else the text will be treated as a page link.