Minimizing an objective

Let’s assume that we want to find the minimum value of R2 that satisfies the constraints of the previous problem. To do this, we will declare and define an objective to be minimized. For doing that we modify the previous model of the problem as follow:

Problem DiodePb
Constants
i: Current = 0.1;

Variables
obj minR2 : Resistance;  (* minR2 is the objective to minimize *)

Elements
Gen : VSource(i);
S : DiodeSys(Gen);

Properties
S.D1.I <= 0.03;

minR2 := S.R2.R;   (* minR2 is defined to the value R of the resistance R2 of the system S *)

End

Compiling and solving

After opening the OptDiodePb.proj project file in DEPS Studio, we can compile the project (project > build the problem).

../_images/ObjCompile.png

Then the problem can be solved with the optimizer (Solve > Minimize).

../_images/ObjSolve.png