> I am new to linear programming and I am having difficulty formulating the
> objective function. glpsol is able to find a solution with a null (0)
> objective function, but cannot process this objective function:
>
> minimize objective_function:
> sum{(i11,j11,k11,i12,j12,k12) in LogicalLink,
> (i21,j21) in PhysicalSwitch, k21 in 1..24,
> (i22,j22) in PhysicalSwitch, k22 in 1..24:
> x[i12,j12,k12,i22,j22,k22] + x[i11,j11,k11,i21,j21,k21] == 2}
> sqrt(
> (x_offset[i21,j21,k21] - x_offset[i22,j22,k22])**2 +
> (y_offset[i21,j21,k21] - y_offset[i22,j22,k22])**2
> );
>
> I'm trying to map a logical network onto a physical network. Logical
> switches with M ports are mapped to physical switches with N ports (N >= M).
> A logical switch port is mapped to a physical switch port. The constraints
> by themselves give a feasible solution, but I wanted to add an optimization
> function to minimize the total length of physical cable. I'm attaching to
> complete MathProg program below.
Glpk is intended for lp/mip only and therefore does not allow quadratic
objectives like in your instance. You can approximate your objective by
a piecewise linear function using a standard technique; since your
objective is convex, no binary variables are needed. Another way is to
use a quadratic programming package.
_______________________________________________
Help-glpk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-glpk