I am working on an (structural) optimization problem, using a gradient based optimization method. The aim is to determine the optimal layout of connections in a frame so as to minimize the cost.
The problem is formulated as as a continuous optimization problem. A zero design variable corresponds to a particular connection, a unit variable to another kind of connection. Intermediate variables will also be allowed in order to obtain a continuous problem, but they will be penalized. In the end, the goal is to obtain a design with only zero and unit variables.
My idea is to assign the intermediate design variables a disproportionally high fictitious cost but I am struggling with the implementation of it. My first thought was to use a parabolic relation between the design variables and the cost of the two cases. If for example the cost of a zero design variable is 0 and the cost of a unit design variable is 1000, a suggestion for the relation can be:
Suggestion relation between design variables and cost
As can be seen on the figure have the intermediate values a high cost. Is this the correct approach for this kind of problem? If not, does anyone have a any advice, recommendation or idea how to overcome this problem?