toji 2.12.0 → 2.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/example/calendar.ipynb +42 -51
- data/example/calendar.yaml +6 -6
- data/example/calendar_file.ipynb +35 -35
- data/example/example_core.rb +1039 -234
- data/example/kake_ingredient.rb +21 -15
- data/example/koji_ingredient.rb +31 -21
- data/example/{koji_making.ipynb → koji_progress.ipynb} +14 -14
- data/example/{koji_making.rb → koji_progress.rb} +3 -2
- data/example/{koji_making.yaml → koji_progress.yaml} +8 -9
- data/example/{koji_making_multi.ipynb → koji_progress_multi.ipynb} +21 -22
- data/example/{moromi.ipynb → moromi_progress.ipynb} +22 -22
- data/example/{moromi.rb → moromi_progress.rb} +3 -2
- data/example/{moromi.yaml → moromi_progress.yaml} +0 -0
- data/example/moto_progress.ipynb +121 -0
- data/example/{moto.rb → moto_progress.rb} +3 -2
- data/example/{moto.yaml → moto_progress.yaml} +14 -15
- data/example/recipe.rb +44 -32
- data/lib/toji.rb +4 -2
- data/lib/toji/calendar.rb +12 -12
- data/lib/toji/calendar/date_column.rb +8 -8
- data/lib/toji/calendar/date_row.rb +6 -6
- data/lib/toji/ingredient.rb +6 -2
- data/lib/toji/ingredient/alcohol.rb +14 -0
- data/lib/toji/ingredient/base.rb +12 -0
- data/lib/toji/ingredient/kake.rb +3 -9
- data/lib/toji/ingredient/koji.rb +19 -10
- data/lib/toji/ingredient/lactic_acid.rb +14 -0
- data/lib/toji/ingredient/rice.rb +51 -4
- data/lib/toji/ingredient/tanekoji.rb +29 -0
- data/lib/toji/ingredient/water.rb +18 -0
- data/lib/toji/ingredient/yeast.rb +21 -0
- data/lib/toji/processing.rb +18 -0
- data/lib/toji/{event → processing}/base.rb +1 -3
- data/lib/toji/processing/cooled_rice.rb +22 -0
- data/lib/toji/processing/cooled_rice_element.rb +8 -0
- data/lib/toji/processing/dekoji.rb +22 -0
- data/lib/toji/processing/dekoji_element.rb +8 -0
- data/lib/toji/processing/kake_processing.rb +7 -0
- data/lib/toji/processing/koji_processing.rb +10 -0
- data/lib/toji/processing/rice_processing.rb +19 -0
- data/lib/toji/processing/soaked_rice.rb +49 -0
- data/lib/toji/processing/soaked_rice_element.rb +18 -0
- data/lib/toji/processing/steamed_rice.rb +22 -0
- data/lib/toji/processing/steamed_rice_element.rb +8 -0
- data/lib/toji/product.rb +11 -32
- data/lib/toji/product/schedule_factory.rb +80 -0
- data/lib/toji/progress.rb +23 -0
- data/lib/toji/progress/base_progress.rb +37 -0
- data/lib/toji/progress/base_state.rb +36 -0
- data/lib/toji/progress/builder.rb +53 -0
- data/lib/toji/progress/graph.rb +11 -0
- data/lib/toji/{brew → progress}/graph/ab.rb +6 -6
- data/lib/toji/{brew → progress}/graph/bmd.rb +2 -2
- data/lib/toji/{brew/graph/multi_progress.rb → progress/graph/multi_progress_note.rb} +11 -11
- data/lib/toji/{brew/graph/progress.rb → progress/graph/progress_note.rb} +20 -18
- data/lib/toji/progress/koji_progress.rb +15 -0
- data/lib/toji/progress/koji_state.rb +23 -0
- data/lib/toji/{brew/moromi.rb → progress/moromi_progress.rb} +10 -6
- data/lib/toji/progress/moromi_state.rb +77 -0
- data/lib/toji/progress/moto_progress.rb +15 -0
- data/lib/toji/progress/moto_state.rb +31 -0
- data/lib/toji/progress/progress.rb +16 -0
- data/lib/toji/progress/state.rb +22 -0
- data/lib/toji/progress/state/baume_to_nihonshudo.rb +21 -0
- data/lib/toji/progress/state/nihonshudo_to_baume.rb +21 -0
- data/lib/toji/recipe.rb +51 -39
- data/lib/toji/recipe/ab_expect.rb +2 -2
- data/lib/toji/recipe/action.rb +2 -2
- data/lib/toji/recipe/step.rb +106 -71
- data/lib/toji/schedule.rb +5 -0
- data/lib/toji/schedule/action_schedule.rb +9 -0
- data/lib/toji/schedule/base.rb +9 -0
- data/lib/toji/schedule/kake_schedule.rb +11 -0
- data/lib/toji/schedule/koji_schedule.rb +11 -0
- data/lib/toji/schedule/rice_schedule.rb +16 -0
- data/lib/toji/utils.rb +43 -0
- data/lib/toji/version.rb +1 -1
- metadata +61 -47
- data/lib/toji/brew.rb +0 -18
- data/lib/toji/brew/base.rb +0 -55
- data/lib/toji/brew/builder.rb +0 -98
- data/lib/toji/brew/graph.rb +0 -11
- data/lib/toji/brew/koji.rb +0 -11
- data/lib/toji/brew/moto.rb +0 -11
- data/lib/toji/brew/state.rb +0 -122
- data/lib/toji/brew/wrapped_state.rb +0 -109
- data/lib/toji/event.rb +0 -5
- data/lib/toji/event/action_event.rb +0 -12
- data/lib/toji/event/kake_event.rb +0 -13
- data/lib/toji/event/koji_event.rb +0 -19
- data/lib/toji/event/rice_event.rb +0 -34
- data/lib/toji/ingredient/kake/actual.rb +0 -26
- data/lib/toji/ingredient/kake/base.rb +0 -18
- data/lib/toji/ingredient/kake/expected.rb +0 -40
- data/lib/toji/ingredient/koji/actual.rb +0 -29
- data/lib/toji/ingredient/koji/actual_fermentable.rb +0 -15
- data/lib/toji/ingredient/koji/base.rb +0 -35
- data/lib/toji/ingredient/koji/expected.rb +0 -45
- data/lib/toji/ingredient/koji/expected_fermentable.rb +0 -15
- data/lib/toji/ingredient/koji_rate.rb +0 -16
- data/lib/toji/ingredient/rice/actual_steamable.rb +0 -27
- data/lib/toji/ingredient/rice/base.rb +0 -40
- data/lib/toji/ingredient/rice/expected_steamable.rb +0 -27
- data/lib/toji/ingredient/rice_rate.rb +0 -23
- data/lib/toji/product/event_factory.rb +0 -70
@@ -1,19 +0,0 @@
|
|
1
|
-
require 'toji/event/rice_event'
|
2
|
-
|
3
|
-
module Toji
|
4
|
-
module Event
|
5
|
-
module KojiEvent
|
6
|
-
include RiceEvent
|
7
|
-
|
8
|
-
attr_reader :dekoji
|
9
|
-
|
10
|
-
def rice_type
|
11
|
-
:koji
|
12
|
-
end
|
13
|
-
|
14
|
-
def dekoji_rate
|
15
|
-
(dekoji.to_f - raw.to_f) / raw.to_f
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
require 'toji/event/base'
|
2
|
-
|
3
|
-
module Toji
|
4
|
-
module Event
|
5
|
-
module RiceEvent
|
6
|
-
include Base
|
7
|
-
|
8
|
-
attr_reader :rice_type
|
9
|
-
attr_reader :index
|
10
|
-
attr_reader :step_indexes
|
11
|
-
|
12
|
-
attr_reader :raw
|
13
|
-
attr_reader :soaked
|
14
|
-
attr_reader :steamed
|
15
|
-
attr_reader :cooled
|
16
|
-
|
17
|
-
def type
|
18
|
-
:rice
|
19
|
-
end
|
20
|
-
|
21
|
-
def soaked_rate
|
22
|
-
(soaked.to_f - raw.to_f) / raw.to_f
|
23
|
-
end
|
24
|
-
|
25
|
-
def steamed_rate
|
26
|
-
(steamed.to_f - raw.to_f) / raw.to_f
|
27
|
-
end
|
28
|
-
|
29
|
-
def cooled_rate
|
30
|
-
(cooled.to_f - raw.to_f) / raw.to_f
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
module Toji
|
2
|
-
module Ingredient
|
3
|
-
module Kake
|
4
|
-
class Actual
|
5
|
-
include Base
|
6
|
-
include Rice::ActualSteamable
|
7
|
-
|
8
|
-
def initialize(raw, soaked, steamed, cooled)
|
9
|
-
@raw = raw.to_f
|
10
|
-
@soaked = soaked.to_f
|
11
|
-
@steamed = steamed.to_f
|
12
|
-
@cooled = cooled.to_f
|
13
|
-
end
|
14
|
-
|
15
|
-
def *(other)
|
16
|
-
if Integer===other || Float===other
|
17
|
-
Actual.new(raw * other, soaked * other, steamed * other, cooled * other)
|
18
|
-
else
|
19
|
-
x, y = other.coerce(self)
|
20
|
-
x * y
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Toji
|
2
|
-
module Ingredient
|
3
|
-
module Kake
|
4
|
-
module Base
|
5
|
-
include Rice::Base
|
6
|
-
|
7
|
-
def +(other)
|
8
|
-
if Base===other
|
9
|
-
Actual.new(raw + other.raw, soaked + other.soaked, steamed + other.steamed, cooled + other.cooled)
|
10
|
-
else
|
11
|
-
x, y = other.coerce(self)
|
12
|
-
x + y
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
module Toji
|
2
|
-
module Ingredient
|
3
|
-
module Kake
|
4
|
-
class Expected
|
5
|
-
include Base
|
6
|
-
include Rice::ExpectedSteamable
|
7
|
-
|
8
|
-
def initialize(raw, rice_rate: RiceRate::DEFAULT)
|
9
|
-
@raw = raw.to_f
|
10
|
-
|
11
|
-
@rice_rate = rice_rate
|
12
|
-
@soaked_rate = rice_rate.soaked_rate
|
13
|
-
@steamed_rate = rice_rate.steamed_rate
|
14
|
-
@cooled_rate = rice_rate.cooled_rate
|
15
|
-
end
|
16
|
-
|
17
|
-
def round(ndigit=0, half: :up)
|
18
|
-
self.class.new(@raw.round(ndigit, half: half), rice_rate: @rice_rate)
|
19
|
-
end
|
20
|
-
|
21
|
-
def *(other)
|
22
|
-
if Integer===other || Float===other
|
23
|
-
self.class.new(@raw * other, rice_rate: @rice_rate)
|
24
|
-
else
|
25
|
-
x, y = other.coerce(self)
|
26
|
-
x * y
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def self.create(x)
|
31
|
-
if self===x
|
32
|
-
x
|
33
|
-
else
|
34
|
-
new(x)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
module Toji
|
2
|
-
module Ingredient
|
3
|
-
module Koji
|
4
|
-
class Actual
|
5
|
-
include Base
|
6
|
-
include Rice::ActualSteamable
|
7
|
-
include ActualFermentable
|
8
|
-
|
9
|
-
def initialize(raw, soaked, steamed, cooled, tanekoji, dekoji)
|
10
|
-
@raw = raw.to_f
|
11
|
-
@soaked = soaked.to_f
|
12
|
-
@steamed = steamed.to_f
|
13
|
-
@cooled = cooled.to_f
|
14
|
-
@tanekoji = tanekoji.to_f
|
15
|
-
@dekoji = dekoji.to_f
|
16
|
-
end
|
17
|
-
|
18
|
-
def *(other)
|
19
|
-
if Integer===other || Float===other
|
20
|
-
Actual.new(raw * other, soaked * other, steamed * other, cooled * other, tanekoji * other, dekoji * other)
|
21
|
-
else
|
22
|
-
x, y = other.coerce(self)
|
23
|
-
x * y
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
module Toji
|
2
|
-
module Ingredient
|
3
|
-
module Koji
|
4
|
-
module Base
|
5
|
-
include Rice::Base
|
6
|
-
|
7
|
-
# 種麹
|
8
|
-
#
|
9
|
-
# 総破精麹を造るには、種麹の量を麹米100kgあたり種麹100gとする
|
10
|
-
# 突き破精麹を造るには、種麹の量を麹米100kgあたり種麹80gとする
|
11
|
-
#
|
12
|
-
# 出典: 酒造教本 P66
|
13
|
-
attr_reader :tanekoji_rate
|
14
|
-
attr_reader :tanekoji
|
15
|
-
|
16
|
-
# 出麹歩合
|
17
|
-
#
|
18
|
-
# 出麹歩合17〜19%のものが麹菌の繁殖のほどよい麹である
|
19
|
-
#
|
20
|
-
# 出典: 酒造教本 P67
|
21
|
-
attr_reader :dekoji_rate
|
22
|
-
attr_reader :dekoji
|
23
|
-
|
24
|
-
def +(other)
|
25
|
-
if Base===other
|
26
|
-
Actual.new(raw + other.raw, soaked + other.soaked, steamed + other.steamed, cooled + other.cooled, tanekoji + other.tanekoji, dekoji + other.dekoji)
|
27
|
-
else
|
28
|
-
x, y = other.coerce(self)
|
29
|
-
x + y
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,45 +0,0 @@
|
|
1
|
-
module Toji
|
2
|
-
module Ingredient
|
3
|
-
module Koji
|
4
|
-
class Expected
|
5
|
-
include Base
|
6
|
-
include Rice::ExpectedSteamable
|
7
|
-
include ExpectedFermentable
|
8
|
-
|
9
|
-
def initialize(raw, rice_rate: RiceRate::DEFAULT, koji_rate: KojiRate::DEFAULT)
|
10
|
-
@raw = raw.to_f
|
11
|
-
|
12
|
-
@rice_rate = rice_rate
|
13
|
-
@soaked_rate = rice_rate.soaked_rate
|
14
|
-
@steamed_rate = rice_rate.steamed_rate
|
15
|
-
@cooled_rate = rice_rate.cooled_rate
|
16
|
-
|
17
|
-
@koji_rate = koji_rate
|
18
|
-
@tanekoji_rate = koji_rate.tanekoji_rate
|
19
|
-
@dekoji_rate = koji_rate.dekoji_rate
|
20
|
-
end
|
21
|
-
|
22
|
-
def round(ndigit=0, half: :up)
|
23
|
-
self.class.new(@raw.round(ndigit, half: half), rice_rate: @rice_rate, koji_rate: @koji_rate)
|
24
|
-
end
|
25
|
-
|
26
|
-
def self.create(x)
|
27
|
-
if self===x
|
28
|
-
x
|
29
|
-
else
|
30
|
-
new(x)
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def *(other)
|
35
|
-
if Integer===other || Float===other
|
36
|
-
Expected.new(@raw * other, rice_rate: @rice_rate, koji_rate: @koji_rate)
|
37
|
-
else
|
38
|
-
x, y = other.coerce(self)
|
39
|
-
x * y
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module Toji
|
2
|
-
module Ingredient
|
3
|
-
class KojiRate
|
4
|
-
attr_reader :tanekoji_rate
|
5
|
-
attr_reader :dekoji_rate
|
6
|
-
|
7
|
-
def initialize(tanekoji_rate, dekoji_rate)
|
8
|
-
@tanekoji_rate = tanekoji_rate
|
9
|
-
@dekoji_rate = dekoji_rate
|
10
|
-
end
|
11
|
-
|
12
|
-
DEFAULT = new(0.001, 0.18)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
@@ -1,27 +0,0 @@
|
|
1
|
-
module Toji
|
2
|
-
module Ingredient
|
3
|
-
module Rice
|
4
|
-
module ActualSteamable
|
5
|
-
def soaked_rate
|
6
|
-
soaking_water / raw
|
7
|
-
end
|
8
|
-
|
9
|
-
def soaking_water
|
10
|
-
soaked - raw
|
11
|
-
end
|
12
|
-
|
13
|
-
def steamed_rate
|
14
|
-
(steamed - raw) / raw
|
15
|
-
end
|
16
|
-
|
17
|
-
def steaming_water
|
18
|
-
steamed - raw
|
19
|
-
end
|
20
|
-
|
21
|
-
def cooled_rate
|
22
|
-
(cooled - raw) / raw
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,40 +0,0 @@
|
|
1
|
-
module Toji
|
2
|
-
module Ingredient
|
3
|
-
module Rice
|
4
|
-
module Base
|
5
|
-
# 白米
|
6
|
-
attr_reader :raw
|
7
|
-
|
8
|
-
# 浸漬米吸水率
|
9
|
-
#
|
10
|
-
# 標準的な白米吸水率は掛米で30〜35%、麹米で33%前後で許容範囲はかなり狭い
|
11
|
-
#
|
12
|
-
# 出典: 酒造教本 P38
|
13
|
-
attr_reader :soaked_rate
|
14
|
-
attr_reader :soaking_water
|
15
|
-
attr_reader :soaked
|
16
|
-
|
17
|
-
# 蒸米吸水率
|
18
|
-
#
|
19
|
-
# 蒸しにより通常甑置き前の浸漬白米の重量よりさらに12〜13%吸水する
|
20
|
-
# 蒸しにより吸水の増加が13%を超える場合は、蒸米の表面が柔らかくべとつく蒸米になりやすい
|
21
|
-
# 蒸米吸水率は麹米及び酒母米で41〜43%、掛米は39〜40%で、吟醸造りの場合は数%低い
|
22
|
-
#
|
23
|
-
# 出典: 酒造教本 P48
|
24
|
-
attr_reader :steamed_rate
|
25
|
-
attr_reader :steaming_water
|
26
|
-
attr_reader :steamed
|
27
|
-
|
28
|
-
# 放冷
|
29
|
-
#
|
30
|
-
# 冷却法で若干異なるが蒸米の冷却により掛米で白米重量の10%、麹米で8%程度の水が失われる
|
31
|
-
# 出典: 酒造教本 P49
|
32
|
-
#
|
33
|
-
# 麹を造るのに適した蒸米は、引込時の吸水率が33%を理想とし、許容幅はプラスマイナス1%である
|
34
|
-
# 出典: 酒造教本 P59
|
35
|
-
attr_reader :cooled_rate
|
36
|
-
attr_reader :cooled
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
module Toji
|
2
|
-
module Ingredient
|
3
|
-
module Rice
|
4
|
-
module ExpectedSteamable
|
5
|
-
def soaking_water
|
6
|
-
raw * soaked_rate
|
7
|
-
end
|
8
|
-
|
9
|
-
def soaked
|
10
|
-
raw + raw * soaked_rate
|
11
|
-
end
|
12
|
-
|
13
|
-
def steaming_water
|
14
|
-
raw * steamed_rate
|
15
|
-
end
|
16
|
-
|
17
|
-
def steamed
|
18
|
-
raw + raw * steamed_rate
|
19
|
-
end
|
20
|
-
|
21
|
-
def cooled
|
22
|
-
raw + raw * cooled_rate
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module Toji
|
2
|
-
module Ingredient
|
3
|
-
class RiceRate
|
4
|
-
# 浸漬米吸水率
|
5
|
-
attr_reader :soaked_rate
|
6
|
-
|
7
|
-
# 蒸米吸水率
|
8
|
-
attr_reader :steamed_rate
|
9
|
-
|
10
|
-
# 放冷後蒸米吸水率
|
11
|
-
attr_reader :cooled_rate
|
12
|
-
|
13
|
-
def initialize(soaked_rate, steamed_rate, cooled_rate)
|
14
|
-
@soaked_rate = soaked_rate
|
15
|
-
@steamed_rate = steamed_rate
|
16
|
-
@cooled_rate = cooled_rate
|
17
|
-
end
|
18
|
-
|
19
|
-
|
20
|
-
DEFAULT = new(0.33, 0.41, 0.33)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|