I am creating a production scheduling solver in which machine X can run in between 300 and 450 units, or the machine can be turned off.

My current constraint says.

300*d<=X<=450*d

d is binary constraint, and X is my decision variable. This constraint works fine for what I need it to. My solver is deciding how much to run the machine each day.

However, I need to apply a fixed cost penalty when d changes from 0 to 1. Essentially saying it costs $26,000 to shut down a machine. I cannot figure out how to do this without getting an error saying my solver is not linear.

So if d=1 on day 1 and d=0 on day 2, I need to apply a fixed cost penalty of $26000 in order to tell the machines to run as long as possible without shutting down.

Any help is greatly appreciated.