Cplex: Advanced Example

Slides:



Advertisements
Similar presentations
Introduction to C Programming
Advertisements

Modelling Constrained Optimization Problems
What is GAMS?. While they are not NLP solvers, per se, attention should be given to modeling languages like: GAMS- AIMMS-
Presented By- Sayandeep Mitra TH SEMESTER Sensor Networks(CS 704D) Assignment.
Cooperative Multiple Input Multiple Output Communication in Wireless Sensor Network: An Error Correcting Code approach using LDPC Code Goutham Kumar Kandukuri.
Wireless Sensor Networks Energy Efficiency Issues
Linear Programming and CPLEX Ting-Yuan Wang Advisor: Charlie C. Chen Department of Electrical and Computer Engineering University of Wisconsin-Madison.
Maximizing the Lifetime of Wireless Sensor Networks through Optimal Single-Session Flow Routing Y.Thomas Hou, Yi Shi, Jianping Pan, Scott F.Midkiff Mobile.
CS Dept, City Univ.1 Maximal Lifetime Scheduling for Wireless Sensor Surveillance Networks Prof. Xiaohua Jia Dept. of Computer Science City University.
Energy Models David Holmer Energy Model  Captures the effect of the limited energy reserves of mobile devices (i.e. batteries)  Models.
 2000 Prentice Hall, Inc. All rights reserved. Chapter 9 - Formatted Input/Output Outline 9.1Introduction 9.2Streams 9.3Formatting Output with printf.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved Streams Streams –Sequences of characters organized.
Vikramaditya. What is a Sensor Network?  Sensor networks mainly constitute of inexpensive sensors densely deployed for data collection from the field.
IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS 2007 (TPDS 2007)
The Minimal Communication Cost of Gathering Correlated Data over Sensor Networks EL 736 Final Project Bo Zhang.
1 Chapter-4: Network Flow Modeling & Optimization Deep Medhi and Karthik Ramasamy August © D. Medhi & K. Ramasamy, 2007.
Input & Output: Console
GAMS Anwendung Nutzeroberfläche eigene Programme Modellierungs- System GAMS AMPL ILOG Studio … Solver CPLEX, CONOPT, MINOS, COIN, BARON,...
1 ILOG CPLEX CPLEX is a product developed by ILOG to solve  LPs  MIPs  QPs  MIQPs  Network Flow problems CPLEX technologies  CPLEX callable library.
Bandwidth Constrained Energy Efficient Transmission Protocol in Wireless Sensor Networks Jain-Shing LIU and Chun-Hung Richard LIN,Nonmembers IEICE TRANS.
Optimal Base Station Selection for Anycast Routing in Wireless Sensor Networks 指導教授 : 黃培壝 & 黃鈴玲 學生 : 李京釜.
Week 1 Algorithmization and Programming Languages.
Evaluating Wireless Network Performance David P. Daugherty ITEC 650 Radford University March 23, 2006.
Linear Programming & its Applications to Wireless Networks Guofeng Deng IMPACT Lab, Arizona State University.
Minimizing Energy Expense for Chain-Based Data Gathering in Wireless Sensor Networks Li-Hsing Yen Chung Hua University Taiwan EWSN 05.
1 Chapter 2 Notation and Definitions Data Structures Transformations.
Energy-Efficient Protocols for communication in Biosensor networks.
On Mobile Sink Node for Target Tracking in Wireless Sensor Networks Thanh Hai Trinh and Hee Yong Youn Pervasive Computing and Communications Workshops(PerComW'07)
Introduction to Algorithmic Processes CMPSC 201C Fall 2000.
Energy-Efficient Communication Protocol for Wireless Microsensor Networks by Wendi Rabiner Heinzelman, Anantha Chandrakasan, and Hari Balakrishnan Presented.
C LANGUAGE UNIT 3. UNIT 3 Arrays Arrays – The concept of array – Defining arrays – Initializing arrays.
Sensor Networks © M Jamshidi.
Bill Tucker Austin Community College COSC 1315
Protocols for Wireless Sensor Networks
The Machine Model Memory
Overview of Wireless Networks:
Computing and Compressive Sensing in Wireless Sensor Networks
© 2016 Pearson Education, Ltd. All rights reserved.
ABSTRACT   Recent work has shown that sink mobility along a constrained path can improve the energy efficiency in wireless sensor networks. Due to the.
TMF1414 Introduction to Programming
Energy-Efficient Communication Protocol for Wireless Microsensor Networks by Wendi Rabiner Heinzelman, Anantha Chandrakasan, and Hari Balakrishnan Presented.
Lifetime Elongation in Wireless Sensor Networks Using Heterogeneity
Distributed Energy Efficient Clustering (DEEC) Routing Protocol
Introduction to Wireless Sensor Networks
Switching Techniques In large networks there might be multiple paths linking sender and receiver. Information may be switched as it travels through various.
Net 435: Wireless sensor network (WSN)
An Equal-Opportunity-Loss MPLS-Based Network Design Model
Routing in Wireless Ad Hoc Networks by Analogy to Electrostatic Theory
Bounding the Lifetime of Sensor Networks Via Optimal Role Assignments
Lecture 5 – Integration of Network Flow Programming Models
CONGESTION CONTROL.
Distributed Clustering for Scalable, Long-Lived Sensor Networks
Wireless Communication Co-operative Communications
Su Yi Babak Azimi-Sadjad Shivkumar Kalyanaraman
Wireless Communication Co-operative Communications
C++ Data Types Data Type
Program Breakdown, Variables, Types, Control Flow, and Input/Output
On Achieving Maximum Network Lifetime Through Optimal Placement of Cluster-heads in Wireless Sensor Networks High-Speed Networking Lab. Dept. of CSIE,
ADVISOR : Professor Yeong-Sung Lin STUDENT : Hung-Shi Wang
Fundamentals of Python: First Programs
Building Java Programs
Instruction Set Principles
ECE 103 Engineering Programming Chapter 8 Data Types and Constants
Functions continued.
Linear Programming Integer Linear Models.
C Language B. DHIVYA 17PCA140 II MCA.
A Distributed Clustering Scheme For Underwater Sensor Networks
BICRITERIA OPTIMIZATION OF ENERGY EFFICIENT PLACEMENT AND ROUTING IN HETEROGENOUS WIRELESS SENSOR NETWORKS Mustafa Gökçe Baydoğan School of Computing,
SPL – PS1 Introduction to C++.
Multiprocessors and Multi-computers
Presentation transcript:

Cplex: Advanced Example Using ILOG Cplex

An Example on Sensor network Sensor node components Sensing devices Processors and memory Wireless transceivers Applications of sensor networks Seismic activity monitoring Habitat monitoring Nuclear plants radiation levels monitoring

Characteristics of Sensor Networks Densely deployed Limited capabilities Memory Processing Communication Unattended operation Battery operated - Energy constrained

SN Architecture - Flat Multi-hop Communication Single-hop Communication

SN Architecture - Hierarchical Form Clusters Communication Intra-cluster Inter-cluster

First Order Radio Model Transmit Energy Receive Energy

Effects of fixed Routing Schemes on Node Energy level while operating for some time Single hop (Direct Trans. Energy) Multi-hop (Min. Trans. Energy) Nodes having residual energy Nodes depleted energy

Problem Description Given A two-tiered sensor network. Location of relay nodes. Average load for each relay node. Find a data communication scheme to maximize lifetime. Minimize energy dissipation of critical relay node.

ILP Formulation Objective function Constraints for relay node Minimize energy dissipation in each relay node. Constraints for relay node Rx/Tx data from own cluster. may forward data from any # of other relay nodes. can transmit to only one other relay node or to the base station (no flow-splitting) Next node must be within transmission range Relay node Sensor node BS

Notation (Inputs) b: Energy coefficient for amplifier. a2(a1): Energy coefficient for transmission (reception). b: Energy coefficient for amplifier. m: Path loss exponent. C: A large constant. bi: Number of bits generated by sensor nodes belonging to cluster i. N: Total number of relay nodes, each relay node having an unique index between 1 and N. The index of the base station is 0. dmax: Transmission range of each relay node. di,j: Distance from relay node i to relay node j.

Continuous Variables: Notation Continuous Variables: Ti = Number of bits transmitted by node i Gi = Amount of energy needed by amplifier in node i to send its data to the next node in its path to the base station. Ri = Number of bits received by node i Fmax = Total energy spent per round by the relay node which is being depleted at the fastest rate. fij = Number of bits sent from node i to node j Binary Variables:

MIP Formulation Minimize Fmax s.t. N = 4 Sensing area Base Station 1 2 3 4 N = 4

MIP in CPLEX Objective function Flow constraint Total number of bits transmitted by node i Sensing area Base Station 1 2 3 4 N = 4

MIP in CPLEX Amplifier energy dissipated by node i to transmit to the next node Total number of bits received by node i from other nodes. No data flow from the base station to any other node. Sensing area Base Station 1 2 3 4 N = 4

MIP in CPLEX All data from a relay node i are sent along a single link, Sensing area Base Station 1 2 3 4 N = 4

MIP in CPLEX Transmission range constraint Limit the total energy dissipated by node i Sensing area Base Station 1 2 3 4 N = 4

MIP Formulation Minimize Fmax s.t. N = 4 Sensing area Base Station 1 2 3 4 N = 4

Demonstration Makefile Header file C source code Commands: Make myProblem (name of your object file) Note: Templates of the above files may be made available

Some Parameters /* set time limit */ /* set gap limit */ status=CPXsetdblparam(env,CPX_PARAM_TILIM,7200.0); /* set gap limit */ status=CPXsetdblparam(env,CPX_PARAM_EPAGAP,2.0); /* Turn on output to the screen */ status = CPXsetintparam(env,CPX_PARAM_SCRIND,CPX_ON);

More on Routines env = CPXopenCPLEX(&status); initializes a CPLEX environment when accessing a license for CPLEX must be the first CPLEX routine called. returns a pointer to a CPLEX environment. int *status_p: A pointer to an integer, where an error code is placed by this routine. CPXLPptr CPXcreateprob (CPXCENVptr env, int *status_p, const char *probname); creates a CPLEX problem object in the CPLEX environment. arguments define an LP problem name. problem created is LP with zero constraints, zero variables, and an empty constraint matrix

More on Routines int CPXreadcopyprob (CPXENVptr env, CPXLPptr lp, char *filename, char *filetype); reads an MPS, LP or SAV file into an existing LP problem object. int CPXmipopt (CPXENVptr env, CPXLPptr lp); after a call to CPXcreateprob(), CPXmipopt() may be used to find a solution to that problem. int CPXgetstat (CPXCENVptr env, CPXCLPptr lp); used to access the solution status of the problem after an LP, QP, or mixed integer optimization.

More on Routines int CPXPUBLIC CPXgetmipobjval(CPXCENVptr env, CPXCLPptr lp, double * objval_p); used to access the mixed integer solution objective value. int CPXPUBLIC CPXgetmipx(CPXCENVptr env, CPXCLPptr lp, double * x, int begin, int end); used to access a range of mixed integer solution values. The beginning and end of the range must be specified. int CPXPUBLIC CPXgetcolname(CPXCENVptr env, CPXCLPptr lp, char ** name, char * namestore, int storespace, int * surplus_p, int begin, int end); used to access a range of column names or, equivalently, the variable names of a CPLEX problem object. The beginning and end of the range, along with the length of the array in which the column names are to be returned, must be specified.

Some Comments on Formats Variable Names: must be no more than 255 characters long and use only the alphanumeric characters (a-z, A-Z, 0-9) and certain symbols: ! “ # $ % & ( ) , . ; ? @ _ ‘ ‘ { } ~. Any line with more than 510 characters is truncated. A variable name cannot begin with a number or a period, and there is one character combination that cannot be used: the letter e or E alone or followed by a number or another e, since this notation is reserved for exponents. Constraint Names: Typing a constraint name and a colon before the actual constraint. ILOG CPLEX give the constraints the default names c1,c2,…,cn. No more than 16 characters, consist of only allowed character, and not begin with a number, a period, or the letter e followed by a positive or negative number or another e. Objective Function Names: can be named in the same manner as constraints. The default name is obj. Bounds: If no bounds are specified, ILOG CPLEX will automatically set the lower bound to 0 and the upper bound to a (+)ve infinity end: indicate that the problem is complete, type end on the last line.