Generates multiblock designs for NuclearCraft.
Project description
NuclearCraft Designer
Generates multiblock designs for NuclearCraft.
Installation
NuclearCraft Designer can be installed via pip using the following command:
pip install nuclearcraft-designer
Usage
Design the best rotor blade sequence of length 10 optimized for 400% expansion using a maximum of 1 SiC-SiC-CMC blade.
from nuclearcraft_designer.overhauled import turbine_rotor_blade
if __name__ == "__main__":
gen = turbine_rotor_blade.designer.RotorBladeSequenceDesigner().design_generator(
10,
4.0,
{
"sic_sic_cmc": 1
}
)
seq = []
for seq in gen:
pass
# Print the best sequence.
for blade in seq:
print(blade.name, end=" ")
print()
Design the best dynamo coil configuration with a side length of 3 and a shaft width of 1:
from nuclearcraft_designer.overhauled import turbine_dynamo_coil
if __name__ == "__main__":
gen = turbine_dynamo_coil.designer.DynamoCoilConfigurationDesigner().design_generator(
3,
1,
{
"connector": 0 # Enabling connectors can lead to invalid designs.
}
)
seq = []
for seq in gen:
pass
for y in range(seq.dims[0]):
for x in range(seq.dims[1]):
print(seq[y, x].name, end=" ")
print()
OR-Tools Powered Designers
Certain NuclearCraft Designer designers have OR-Tools powered alternatives. They are generally faster than the normal designers, but are less reliable and may have fewer features.
OR-Tools is not a required dependency. Use the following command to install it:
pip install ortools
The above usage examples can be done as follows (with missing features omitted):
from nuclearcraft_designer.overhauled import turbine_rotor_blade
if __name__ == "__main__":
status, sequence = turbine_rotor_blade.beta_designer.RotorBladeSequenceDesigner().design(
10,
4.0,
{
"sic_sic_cmc": 1
}
)
print(status)
for blade in sequence:
print(blade.name, end=" ")
print()
Note that the OR-Tools powered designer can design 7x7 turbines in a reasonable amount of time, while the normal designer can't do so for 5x5 turbines.
from nuclearcraft_designer.overhauled import turbine_dynamo_coil
if __name__ == "__main__":
status, configuration = turbine_dynamo_coil.beta_designer.DynamoCoilConfigurationDesigner().design(
7,
1,
{
"connector": 0 # Enabling connectors can lead to invalid designs.
}
)
print(status)
for y in range(configuration.dims[0]):
for x in range(configuration.dims[1]):
print(configuration[y, x].name, end=" ")
print()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for nuclearcraft_designer-0.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8abb5f838906c9afffcd6c5ffd4dfdf4b9c2a39661d1ad095079cebe4c0b31c9 |
|
MD5 | 5615f5e9485beb9a6e0064ed9cd2a751 |
|
BLAKE2b-256 | ff0e2dd97b4bd976134b94da131a8589e231b7744b01057269a7de3b8e610f77 |
Hashes for nuclearcraft_designer-0.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55dafa484eb937e2f9d0aae8f02dad55a9ec3a2f2099fa7a7ee4924b430f1d74 |
|
MD5 | dcec5d1268010d686e3d6d53b4aed4a1 |
|
BLAKE2b-256 | c27157c3e686b8a69662f69a8a0fa40e1e0d29b352d079ae7a84adf67316134f |