# Define a set on CPLEX Studio

 0 I have the following question on how to define a set: E^((1) ) (p_0,p_d )={k_u∈E_1 (p_0,p_d )|(p_0,p_d )∈Q^((1)) } Where Q^((1))={(p_0,p_d )∈Q:0 How to define E^((1) ) (p_0,p_d ) / Q^((1)) and E_1 (p_0,p_d )? The following is the code: int Resources = ...; // Number of Stations to select; range Stations = 1..Resources; float charge_stations[Stations]; range Interchanges = 1..Resources; // Number of Interchanges to be covered; // Define Traffic Flow sets, distance and related binary variable tuple flow {int i; int j;} setof(flow) Flows = { | ordered i,j in Interchanges}; float distance_flow[Flows] = ...; tuple stations { float charge_stations; } tuple traffic_flow { float distance_flow; } float Budget; float Safety_distance; dvar int Build[Stations]; dvar boolean FlowsInSet1[Flows]; dvar boolean Cover[ in Flows]; Thanks a lot! asked 28 Apr '16, 18:30 Crubal 11●1●2 accept rate: 0% Paul Rubin ♦♦ 14.6k●5●13
Be the first one to answer this question!
 toggle preview community wiki

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "Title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported

Tags:

×191
×13
×4
×1