Fix factory.yml for fast-inserter
This commit is contained in:
parent
c472a28591
commit
abf2cac093
4 changed files with 85 additions and 11 deletions
|
|
@ -11,7 +11,7 @@ subfactories:
|
|||
recipe: electronic-circuit
|
||||
machines: 6
|
||||
machine: assembly-machine-3
|
||||
- !BeltPool
|
||||
- !Splitter
|
||||
- !SubFactory
|
||||
recipe: inserter
|
||||
machines: 2
|
||||
|
|
@ -20,11 +20,16 @@ subfactories:
|
|||
recipe: fast-inserter
|
||||
machines: 2
|
||||
machine: assembly-machine-3
|
||||
- !SideLoader
|
||||
- !ExternalConnection
|
||||
inputs: 1
|
||||
outputs: 8
|
||||
- !SideLoader
|
||||
factory_connections:
|
||||
- item: iron-gear-wheel
|
||||
amount: 5
|
||||
from: 0
|
||||
to: 4
|
||||
to: 6
|
||||
- item: copper-cable
|
||||
amount: 45
|
||||
from: 1
|
||||
|
|
@ -41,3 +46,39 @@ factory_connections:
|
|||
amount: 10
|
||||
from: 3
|
||||
to: 5
|
||||
- item: iron-plate;iron-gear-wheel
|
||||
amount: 10
|
||||
from: 6
|
||||
to: 4
|
||||
- item: iron-plate
|
||||
amount: 5
|
||||
from: 7
|
||||
to: 6
|
||||
- item: iron-plate
|
||||
amount: 15
|
||||
from: 7
|
||||
to: 2
|
||||
- item: inserter
|
||||
amount: 5
|
||||
from: 4
|
||||
to: 8
|
||||
- item: iron-plate
|
||||
amount: 10
|
||||
from: 7
|
||||
to: 8
|
||||
- item: iron-plate;inserter
|
||||
amount: 20
|
||||
from: 8
|
||||
to: 5
|
||||
- item: fast-inserter
|
||||
amount: 5
|
||||
from: 5
|
||||
to: 7
|
||||
- item: copper-plate
|
||||
amount: 22.5
|
||||
from: 7
|
||||
to: 1
|
||||
- item: iron-plate
|
||||
amount: 10
|
||||
from: 7
|
||||
to: 0
|
||||
|
|
|
|||
|
|
@ -29,16 +29,16 @@ fn main() {
|
|||
let l = ValidLayout {
|
||||
max_tries: 10,
|
||||
retries: 20,
|
||||
start_size: Position::new(48, 48),
|
||||
growth: Position::new(0, 0),
|
||||
start_size: Position::new(64, 64),
|
||||
growth: Position::new(4, 4),
|
||||
};
|
||||
|
||||
let l = GeneticAlgorithm {
|
||||
mutation_retries: 20,
|
||||
population_size: 20,
|
||||
population_keep: 1,
|
||||
population_new: 2,
|
||||
generations: 50,
|
||||
population_size: 40,
|
||||
population_keep: 5,
|
||||
population_new: 5,
|
||||
generations: 40,
|
||||
valid_layout: l,
|
||||
};
|
||||
let p = ConflictAvoidance {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ pub enum Building {
|
|||
inputs: usize,
|
||||
outputs: usize,
|
||||
},
|
||||
BeltPool,
|
||||
Splitter,
|
||||
SideLoader,
|
||||
}
|
||||
|
||||
|
|
@ -140,7 +140,40 @@ pub fn generate_factory<L: Layouter, P: Pathfinder>(
|
|||
blueprints.push(blueprint);
|
||||
used_connections.push((0, 0));
|
||||
}
|
||||
Building::BeltPool => todo!(),
|
||||
Building::Splitter => {
|
||||
let mut blueprint = Blueprint::new();
|
||||
blueprint.add_entity(Entity::new_splitter(
|
||||
Beltspeed::Fast,
|
||||
Position::new(2, 1),
|
||||
Direction::Up,
|
||||
));
|
||||
|
||||
blocks.push(MacroBlock {
|
||||
size: Position::new(2, 1),
|
||||
input: vec![
|
||||
Interface {
|
||||
offset: Position::new(0, 0),
|
||||
dir: Direction::Up,
|
||||
},
|
||||
Interface {
|
||||
offset: Position::new(1, 0),
|
||||
dir: Direction::Up,
|
||||
},
|
||||
],
|
||||
output: vec![
|
||||
Interface {
|
||||
offset: Position::new(0, 0),
|
||||
dir: Direction::Up,
|
||||
},
|
||||
Interface {
|
||||
offset: Position::new(1, 0),
|
||||
dir: Direction::Up,
|
||||
},
|
||||
],
|
||||
});
|
||||
blueprints.push(blueprint);
|
||||
used_connections.push((0, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue