OrderedSet86 / gtnh-flow

Factory Optimization Flowcharts for Gregtech: New Horizons
MIT License
79 stars 24 forks source link

Unclear log output #31

Open trainvoi opened 5 months ago

trainvoi commented 5 months ago

Error:

> susy/germanium line.yaml
_preProcessing.py:118 INFO Fixing factory cycle by redirecting "[Input] Oxalic Acid Solution" to sink
_solver.py:666 INFO Running linear solver...
_solver.py:260 INFO Solving multi-input scenario involving waelz slag dust!
_solver.py:260 INFO Solving multi-input scenario involving impure germanium tetrachloride!
51 0.5*v58
52 3.0*v58
53 0.0015*v58
54 2.0*v58
55 0.0015*v58
57 0.0005*v58
58 1.0*v58
all soln: {(0.5, 2.0, 0.25, 2.0, 12.5, 0.25, 0.25, 6.25, 0.25, 250.0, 250.0, 250.0, 25.0, 0.2, 250.0, 0.2, 10.0, 80.0, 20.0, 0.25, 2.0, 12.5, 0.25, 0.25, 6.25, 0.25, 125.0, 0.125, 125.0, 0.03125, 125.0, 0.140625, 93.75, 93.75, 93.75, 93.75, 93.75, 56.25, 93.75, 93.75, 56.25, 18.75, 93.75, 93.75, 37.5, 4.6875, 37.5, 37.5, 9.375, 29.375, 26.4375, 0.5*v58, 3.0*v58, 0.0015*v58, 2.0*v58, 0.0015*v58, 2.0*v58, 0.0005*v58, 1.0*v58, 0.25, 25.0, 25.0, 0.5, 0.25, 0.25, 0.375, 0.125, 0.075, 0.05, 0.0078125, 0.03125, 56.25, 0.0375, 0.1125, 56.25, 56.25, 0.1125, 0.3375, 0.1125, 0.140625, 0.03125, 15.625, 15.625, 15.625, 28.125, 28.125, 56.25, 0.25, 0.25, 20.0, 9.375)}
-1x mv rotary kiln
    Waelz Oxide Dust (1)
    Waelz Slag Dust (1)
    Carbon Dioxide (25)
-1x lv autoclave
    Germanium Leach (1000)
-1x lv autoclave
    Germanium Concentrate Dust (0.8)
    Zinc Leach (1000)
-1x lv batch reactor
    Impure Germanium Tetrachloride (100)
-1x mv rotary kiln
    Germanium Rich Oxide Dust (1)
    Waelz Slag Dust (1)
    Carbon Dioxide (25)
Traceback (most recent call last):
  File "C:\Users\PV\Documents\gtnh-flow\factory_graph.py", line 69, in generate_one
    self.graph_gen(self, project_name[:-5], recipes, self.graph_config)
  File "C:\Users\PV\Documents\gtnh-flow\src\graph\_solver.py", line 668, in systemOfEquationsSolverGraphGen
    solver.run()
  File "C:\Users\PV\Documents\gtnh-flow\src\graph\_solver.py", line 77, in run
    self._solve()
  File "C:\Users\PV\Documents\gtnh-flow\src\graph\_solver.py", line 333, in _solve
    raise RuntimeError(
RuntimeError:
    Unsolved variables - machine system is underdefined.
    Likely cause is either disconnected machines or too little information.

factory_graph.py:72 ERROR Error generating graph for project "susy/germanium line.yaml":
    Unsolved variables - machine system is underdefined.
    Likely cause is either disconnected machines or too little information.
factory_graph.py:73 ERROR If error cause is not obvious, please notify dev: https://github.com/OrderedSet86/gtnh-flow/issues

Code:

- m: rotary kiln
  tier: MV
  I:
    zinc oxide fume dust: 2
    carbon dust: 1
    natural gas: 8
    oxygen: 50
  O:
    waelz oxide dust: 1
    waelz slag dust: 1
    carbon dioxide : 25
  eut: 120
  dur: 4
  number: 1
  #target:
     #coke dust: 12
  group: zinc oxide fume chain
- m: autoclave
  tier: LV
  I:
    waelz oxide dust: 1
    '[input] sulfuric acid': 1000
  O:
    germanium leach: 1000
  eut: 30
  dur: 10
  group: zinc oxide fume chain
- m: autoclave
  tier: LV
  I:
    germanium leach: 1000
    tannic acid solution: 100
  O:
    germanium concentrate dust: 0.8
    zinc leach: 1000
  eut: 30
  dur: 10
  group: zinc oxide fume chain
- m: batch reactor
  tier: LV
  I:
    germanium concentrate dust: 1
    chlorine: 50
    '[input] hydrochloric acid': 400
  O:
    impure germanium tetrachloride: 100
  eut: 30
  dur: 10
  group: zinc oxide fume chain

- m: rotary kiln
  tier: MV
  I:
    zinc leach residue dust: 8
    carbon dust: 1
    natural gas: 8
    oxygen: 50
  O:
    germanium rich oxide dust: 1
    waelz slag dust: 1
    carbon dioxide : 25
  eut: 120
  dur: 4
  number: 1
  group: germanium rich oxide chain
- m: autoclave
  tier: LV
  I:
    germanium rich oxide dust: 2
    '[input] oxalic acid solution': 1000
  O:
    lead-silica residue dust: 1
    germanium oxalate leach: 1000
  eut: 30
  dur: 10
  group: germanium rich oxide chain
- m: batch reactor
  tier: LV
  I:
    small pile of iron dust: 2
    germanium oxalate leach: 8000
  O:
    iron oxalate dihydrate dust: 9
    purified germanium oxalate leach: 6000
  eut: 30
  dur: 10
  group: germanium rich oxide chain
- m: centrifuge
  tier: LV
  I:    
    purified germanium oxalate leach: 1000
    '[input] germanium-gallium extraction mixture': 1000
  O:
    germanium-gallium extract: 1000
    '[output] oxalic acid solution': 1000
  eut: 30
  dur: 10
  group: germanium rich oxide chain
- m: centrifuge
  tier: LV
  I:    
    '[input] diluted sulfuric acid': 600
    germanium-gallium extract: 1000
  O:
    germanium extract: 1000
    gallium sulfate solution: 600
  eut: 30
  dur: 10
  group: germanium rich oxide chain
- m: centrifuge
  tier: LV
  I:    
   sodium hydroxide: 200
   germanium extract: 1000
  O:
    '[output] germanium-gallium extraction mixture': 1000
    germanium oxalate solution: 400
  eut: 30
  dur: 10
  group: germanium rich oxide chain
- m: batch reactor
  tier: LV
  I:
    chlorine: 50
    '[input] hydrochloric acid': 400
    germanium oxalate solution: 400
  O:
    impure germanium tetrachloride: 100
  eut: 30
  dur: 10
  group: germanium rich oxide chain

- m: distillery
  tier: LV
  I:
    impure germanium tetrachloride: 40
  O:
    german tetrachloride: 36
  eut: 7
  dur: 0.8
  group: germanium refinement
- m: batch reactor
  tier: LV
  I:
    germanium tetrachloride: 1000
    ultra pure water: 6000
  O:
    germanium dioxide dust: 3
    '[output] hydrochloric acid': 4000
  eut: 30
  dur: 10
  group: germanium refinement
- m: tube furnace
  tier: LV
  I:
    germanium dioxide dust: 3
    hydrogen: 4000
  O:
    germanium dust: 1
    steam: 2000
  eut: 30
  dur: 10
  group: germanium refinement

- m: chemical bath
  tier: LV
  I:
    wood log: 1
    distilled water: 100
  O:
    tannic acid solution: 100
  eut: 30
  dur: 10
- m: centrifuge
  tier: LV
  I:
    waelz slag dust: 1
  O:
    hematite dust: 0.5
    quicklime dust: 0.5
    silicon dioxide dust: 0.75
  eut: 30
  dur: 2
- m: centrifuge
  tier: LV
  I:
    lead-silica residue dust: 1
  O:
    silicon dioxide dust: 0.6
    anglesite dust: 0.4
  eut: 30
  dur: 8
- m: packager
  tier: LV
  I:
    iron dust: 1
  O:
    small pile of iron dust: 4
  eut: 12
  dur: 0.5
- m: electrolyzer
  tier: LV
  I:
    gallium sulfate solution: 3000
  O:
    gallium: 2
    oxalic acid: 6
    '[output] oxygen': 3000
    '[output] sulfuric acid': 3000
  eut: 12
  dur: 0.5
- m: mixer
  tier: LV
  I:
    oxalic acid: 6
    distilled water: 3000
  O:
    '[output] oxalic acid solution': 1000
  eut: 12
  dur: 0.5
- m: roaster
  tier: LV
  I:
    iron oxalate dihydrate dust: 9
  O:
    iron ii oxide dust: 2
    steam: 1000
    carbon monoxide: 1000
    carbon dioxide: 1000
  eut: 12
  dur: 0.5
- m: mixer
  tier: LV
  I:
    '[input] sulfuric acid': 1000
    water: 1000
  O:
    '[input] diluted sulfuric acid': 2000
  eut: 12
  dur: 0.5
OrderedSet86 commented 5 months ago

What is unclear? The error message tells you exactly what the issue is:

Unsolved variables - machine system is underdefined.
Likely cause is either disconnected machines or too little information.

germanium

When you look at the debug chart, you see that there are three independent lines:

  1. The germanium chain
  2. The zinc oxide fume chain.
  3. The ultra pure water chain.

For 1 and 2 they have overlaps in the Waelz Slag Dust centrifuge and the Impure Germanium Tetrachloride distillery. They can function independently, so specifying one is not enough to tell you how to calculate the entire graph. Fortunately you specified both.

3 is completely independent and disconnected from the rest of the machines, so this is the cause of the issue.

The cause is that you misspelled "Germanium Tetrachloride" as "German Tetrachloride" in the impure distillery, so that caused 3 to be disconnected. Fixing that creates a valid graph:

germanium

OrderedSet86 commented 5 months ago

I am leaving this open for now since I can detect disconnected machines, so that part of the error message can be improved

trainvoi commented 5 months ago

I would appreciate it if error message could tell which input/output material is disconnected from source/target.