How to add Solve Commands to all or selected time steps with GetSolveCommands?

Ayush Kumar
Ayush Kumar Member, Moderator, Employee Posts: 470
100 Answers 250 Likes 100 Comments Second Anniversary
✭✭✭✭

How to add Solve Commands to all or selected time steps with GetSolveCommands?

Comments

  • Ayush Kumar
    Ayush Kumar Member, Moderator, Employee Posts: 470
    100 Answers 250 Likes 100 Comments Second Anniversary
    ✭✭✭✭
    edited May 2024

    XML:

    <getsolvecommands timeDependent="true">AddSolveCommands</getsolvecommands>
    

    Python:

    def AddSolveCommands(load, step, stream):
        return
    
  • Mike.Thompson
    Mike.Thompson Member, Employee Posts: 367
    25 Answers 100 Comments Second Anniversary 25 Likes
    ✭✭✭✭

    I recommend using the callback GetCommands and location = solve

    This will also pass the IsolverData object to the callback that tracks the current step number as well as access to lots of useful info.