com.net2plan.examples.ocnbook.offline

• Object
• All Implemented Interfaces:
com.net2plan.interfaces.networkDesign.IAlgorithm, com.net2plan.internal.IExternal

```public class Offline_tcfa_xdeFormulationsMinLinkCost
extends Object
implements com.net2plan.interfaces.networkDesign.IAlgorithm```
This algorithm gives access to several variants of full topology design problems.
 This algorithm gives access to several variants of full topology design problems. Given a set of nodes and a set of unicast demands with known offered traffic. The algorithm searches for (i) the set of links to deploy, (ii) the link capacities, and (iii) how the traffic is routed over the links. The objective function consists in minimizing the cost, given by the sum of the link costs. The cost of a link is the sum of a fixed cost (proportional to the link length) that applies if the link exists (whatever its capacity is), and a variable cost proportional to its capacity and distance. Different problem variants can be selected, with different constraints (e.g. constraint the topology to be bidirectional, to be a ring, a tree...). The solution is searched by solving several variants of flow-link formulations.
Keywords:
Input parameters:
 `topologyType`: Value to select within {arbitrary-mesh, bidirectional-mesh, unidirectional-ring, bidirectional-ring, bidirectional-tree} The constraints on the link topology: arbitrary topology (no specific constraint), arbitrary bidirectional topology (link from i to j exists iff it exists from j to i), unidirectional ring, bidirectional ring, bidirectional tree `solverName`: Value to select within {glpk, ipopt, xpress, cplex} The solver name to be used by JOM. GLPK and IPOPT are free, XPRESS and CPLEX commercial. GLPK, XPRESS and CPLEX solve linear problems w/w.o integer contraints. IPOPT is can solve nonlinear problems (if convex, returns global optimum), but cannot handle integer constraints `solverLibraryName`: Default: The solver library full or relative path, to be used by JOM. Leave blank to use JOM default. `maxSolverTimeInSeconds`: Default: -1.0 Maximum time granted to the solver to solve the problem. If this time expires, the solver returns the best solution found so far (if a feasible solution is found) `fixedCostFactorPerKm`: Default: 1.0 Fixed cost factor per km of a link (the cost of a link of d km and 0 capacity is d times this quantity) `linkPropagationSpeedInKmPerSecond`: Default: 200000.0 The propagation speed in km per second of the deployed links `U_max`: Default: -1.0 The maximum capacity a link can have. If non positive, there is not limit `variableCostFactorPerKmAndTrafficUnit`: Default: 1.0 Variable cost factor per km and traffic unit of a link (the cost of a link of 1 km and 1 unit of capacity, and 0 of fixed cost)
• ### Constructor Summary

Constructors
Constructor and Description
`Offline_tcfa_xdeFormulationsMinLinkCost()`
• ### Method Summary

All Methods
Modifier and Type Method and Description
`String` ```executeAlgorithm(com.net2plan.interfaces.networkDesign.NetPlan netPlan, Map<String,String> algorithmParameters, Map<String,String> net2planParameters)```
Execute the algorithm.
`String` `getDescription()`
Returns the description.
`List<com.net2plan.utils.Triple<String,String,String>>` `getParameters()`
Returns the list of required parameters, where the first item of each element is the parameter name, the second one is the parameter value, and the third one is the parameter description.
• ### Methods inherited from class Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Constructor Detail

`public Offline_tcfa_xdeFormulationsMinLinkCost()`
• ### Method Detail

• #### executeAlgorithm

```public String executeAlgorithm(com.net2plan.interfaces.networkDesign.NetPlan netPlan,
Map<String,String> algorithmParameters,
Map<String,String> net2planParameters)```
Description copied from interface: `com.net2plan.interfaces.networkDesign.IAlgorithm`
Execute the algorithm.
Specified by:
`executeAlgorithm` in interface `com.net2plan.interfaces.networkDesign.IAlgorithm`
Parameters:
`netPlan` - A network plan which serves as input and output
`algorithmParameters` - A key-value map with specific algorithm parameters.

Important: The algorithm developer is responsible to convert values from String to their respective type, and to check that values

`net2planParameters` - A key-value map with `Net2Plan`-wide configuration options
Returns:
An output `String`
• #### getDescription

`public String getDescription()`
Description copied from interface: `com.net2plan.interfaces.networkDesign.IAlgorithm`
Returns the description.
Specified by:
`getDescription` in interface `com.net2plan.interfaces.networkDesign.IAlgorithm`
Specified by:
`getDescription` in interface `com.net2plan.internal.IExternal`
Returns:
Description
• #### getParameters

`public List<com.net2plan.utils.Triple<String,String,String>> getParameters()`
Description copied from interface: `com.net2plan.interfaces.networkDesign.IAlgorithm`

Returns the list of required parameters, where the first item of each element is the parameter name, the second one is the parameter value, and the third one is the parameter description.

It is possible to define type-specific parameters if the default value is set according to the following rules (but user is responsible of checking in its own code):

• If the default value is #select# and a set of space- or comma-separated values, the GUI will show a combobox with all the values, where the first one will be the selected one by default. For example: "#select# hops km" will allow choosing in the GUI between hops and km, where hops will be the default value.
• If the default value is #boolean# and true or false, the GUI will show a checkbox, where the default value will be true or false, depending on the value accompanying to #boolean#. For example: "#boolean# true" will show a checkbox marked by default.
• If the default value is #algorithm#, the GUI will prepare a new interface to select an algorithm as parameter. Three new fields will be added, including "_file", "_classname" and "_parameters" suffixes to the indicated parameter name, refer to the `.class` or `.jar` file where the code is located, the class name, and a set of parameters (pair of key-values separated by commas, where individual key and value are separated with an equal symbol. The same applies to reports (#report#), event generators (#eventGenerator#) and event processors (#eventProcessor#).
Specified by:
`getParameters` in interface `com.net2plan.interfaces.networkDesign.IAlgorithm`
Specified by:
`getParameters` in interface `com.net2plan.internal.IExternal`
Returns:
List of specific parameters