Skip to main content

How to use a dict for .start?



1 comment

  • Riley Clement
    Gurobi Staff Gurobi Staff

    Hi Dejan,

    You could set the .Start attribute with the following code:

    for key, value in start_dict.items():
       tyredeg[key].Start = value

    However Start values are only valid for integer (including binary) variables, so this code will not have the effect you want it to.

    We do have PStart which can be used with continuous variables (the values must be provided for every variable), but it also needs to be used in conjunction with DStart which is related to constraints.

    - Riley


Please sign in to leave a comment.