BlockScience / aztec-gddt

Aztec Granular Design Digital Twin
Apache License 2.0
10 stars 0 forks source link

Possible Bug: In s_current_process_time_dynamical should it be changing current_phase_init_time or duration_in_current_phase #293

Open SeanMcOwen opened 2 months ago

SeanMcOwen commented 2 months ago

I think it should actually be duration_in_current_phase?

Code:

def s_current_process_time_dynamical(
    _1, _2, _3, state: AztecModelState, signal: SignalTime
):
    """
    State update function for change in block number.

    Args:
        signal (Signal): The Signal, generated in p_evolve_time, of how many blocks to advance time.

    Returns:
        VariableUpdate
    """
    delta_blocks = signal.get("delta_blocks", 0)
    updated_process: Process | None = copy(state["current_process"])
    if updated_process is not None:
        if delta_blocks > 0:
            updated_process.current_phase_init_time += delta_blocks

    return ("current_process", updated_process)
jackhack00 commented 2 months ago

@danlessa

SeanMcOwen commented 2 months ago

This is the structure it is currently in:

image

Maybe it is meant to say a newly created process starts later because it is set to time T, but during advance blocks it was not active so it actually starts at T + delta_blocks? That would be the only explanation I see.

But if it is supposed to update a process that had a dynamic time change itself and not the next queued process then I think it should be duration?

SeanMcOwen commented 2 months ago

This comes before it and probably should be adding a new event so maybe it does make sense?

image

SeanMcOwen commented 2 months ago

I think this was the solution to potentially this:

image