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 git+https://github.com/MtCelesteMa/nuclearcraft-designer.git@v0.3.0
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.cols):
for x in range(seq.cols):
print(seq[x, y].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": 2,
}
)
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.cols):
for x in range(configuration.cols):
print(configuration[x, y].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.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fdb753de40da46cc39b127f5f5be5dd6fdd9e5475685fddeea58cc3c60ec73c |
|
MD5 | a0a89bdca8846eec647c485b65795283 |
|
BLAKE2b-256 | 3475ef39debe973338195068a435e823e543cad54d5a6d3965dd2e78b13865f0 |
Hashes for nuclearcraft_designer-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5dd7a4dea0b6ef3b589615a6193c25f4b73ef5e1cdc85ddfffbc0397419b2a9 |
|
MD5 | 323a0f07328877c715cb9de1cd92bde5 |
|
BLAKE2b-256 | 17aa58adeb970e1abac17119721e8f40639371a488f2f1570958099f393aaeea |