Skip to content

function problem.new_phase_like does not copy integral_variable guess #79

@jtheinen

Description

@jtheinen

#Minimal reproduction:
problem = pycollo.OptimalControlProblem(
name="Simple Block Slide",)
phase_A = problem.new_phase(name="A")
phase_A.integrand_functions = [Fx **2]
phase_A.bounds.integral_variables = [[0,1000]]
phase_A.guess.integral_variables = [0]

phase_B = problem.new_phase_like(
phase_for_copying=phase_A,
name="B",
)
print(phase_A.guess.integral_variables)
print(phase_B.guess.integral_variables)

OUT:
[0]
None

#Solution
input phase_B.guess.integral_variables manually

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions