Skip to content

Steps - #28

Draft
sbancuz wants to merge 5 commits into
devfrom
steps
Draft

Steps#28
sbancuz wants to merge 5 commits into
devfrom
steps

Conversation

@sbancuz

@sbancuz sbancuz commented Aug 1, 2026

Copy link
Copy Markdown
Owner

A step pins an external flow into or out of the network. Its amount is always expressed per second and is treated as a fixed constant.

  • Positive amount = source: the step injects N items/fluid per second into the network through its output port.
  • Negative amount = sink: the step consumes |N| items/fluid per second through its input port.
  • Zero = no effect. The step is ignored even when connected since it's the same as connecting 2 nodes together

In balancing:

  • Sinks force the machines feeding them to scale their operator count up until their per-second production covers the sink's demand.
  • Sources feed downstream machines, reducing (or fully eliminating, if supply is enough) what those machines demand from upstream producers.
  • Step values themselves never change.

In the summary:

  • A positive step appears as a product (surplus).
  • A negative step nets against products; whatever isn't covered shows up as an External Input (deficit).
  • Step-sourced lines display their raw per-second value in both CYCLES and THROUGHPUT modes.

@sbancuz
sbancuz changed the base branch from master to dev August 3, 2026 09:31
sbancuz added 2 commits August 3, 2026 11:33
# Conflicts:
#	.gitignore
#	dependencies.gradle
#	src/main/java/com/sbancuz/plannh/data/flowchart/Node.java

@TheYoingLad TheYoingLad left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cant comment on the backend stuff.
If the frontend is placeholder then ill approve it, ill take a proper look and possibly rework it later.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there an existing implementation if this somewhere?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is, I can't find it. Look at everything in the project that implements JsonSerializer

@sbancuz

sbancuz commented Aug 7, 2026

Copy link
Copy Markdown
Owner Author

Cant comment on the backend stuff. If the frontend is placeholder then ill approve it, ill take a proper look and possibly rework it later.

I'd say half and half, could be made prettier, but I suppose that's it no? Do you have another design in mind?

@TheYoingLad TheYoingLad left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only a few nitpicks, happy with everything else.

Comment on lines +48 to +51
@Override
protected void onTextChanged() {
super.onTextChanged();
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary override

Comment on lines +23 to +24
width(50);
height(16);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
width(50);
height(16);
size(50, 16);

public StepAreaWidget(StepWidget parent) {
this.parent = parent;
this.data = parent.getData();
size(60, 60);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
size(60, 60);
size(60);

Comment thread src/main/java/com/sbancuz/plannh/gui/step/StepAreaWidget.java
Comment thread src/main/java/com/sbancuz/plannh/gui/step/StepWidget.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants