Hi,
I am creating a LP/MIP using a custom class MyCplex, which extends IloCplex. In this class I might add some constraints involving boolean Variables, depending on the chosen settings. If I do, I would like to initialize these variables with a value. I understand that this can be done by adding a warm start to the model and changing the warm start as shown in the following snippet.
Second, I tried checking if the program already has an associated warm start, with the following line:
This leads to another error:
I found a way to check if an IloCplex is a MIP, but now way of designating it as one. I could after the creation of the entire model iterate through all variables and then set the initial values, however this would require a lot of restructuring as I have no saved reference to these variables after adding them to the model.
I thought about adding a dummy boolean variable right at the start, in order to turn the model into an MIP which would (hopefully) allow me to add a MIP start, but this feels like a workaround, which I would like to avoid.
Is there a way of adding the MIP start beforehand without the suggested solutions?
------------------------------
Lia Gardner
------------------------------
#DecisionOptimization