A COMPUTERIZED POULTRY FARM OPTIMIZATION SYSTEM BY

TURYARUGAYO THOMPSON 16/U/12083/PS 216008822

SUPERVISOR MR. SERUNJOGI AMBROSE

A DISSERTATION SUBMITTED TO THE SCHOOL OF STATISTICS AND PLANNING IN PARTIAL FULFILMENT FOR THE AWARD FOR A DEGREE OF BACHELOR OF STATISTICS

AT MAKERERE UNIVERSITY

JUNE 2019

i

ii

iii

DEDICATION

I dedicate this project to the ALMIGHTY GOD for giving me a healthy life, secondly to my parents; Mr. and Mrs. Twamuhabwa Wilson, my brother Mr. Turyasingura Thomas, my aunt

Mrs. Olive Kamuli for being supportive to me financially and always encouraging me to keep moving on. I lastly dedicate it to my course mates most especially the B. Stat computing class.

iv

ACKONWLEDGEMENT

I would like to thank the Almighty God for enabling me finish my final year project. I would also like to express my special appreciation to my supervisor Mr. Sserunjogi Ambrose in providing me with me suggestions, encouragement and helped me to coordinate my project and in writing this document.

A special thanks goes to my parents; Mr. and Mrs. Twamuhabwa Wilson, my brother Mr.

Turyasingura Thomas, my aunt Mrs. Olive Kamuli for being supportive to me financially and spiritually towards the accomplishment of this dissertation.

Lastly, many thanks go to my closest friend Mr. Kyagera Sulaiman, my fellow students most especially Akandinda Noble, Mulapada Seth Augustine, Kakuba Caleb Kanyesigye, Nuwabasa

Moses, Kyomuhendo Evarce among others who invested their effort and for being supportive and kind to me during the time of working on my final year project.

v

TABLE OF CONTENTS

DECLARATION ...... i

APPROVAL ...... Error! Bookmark not defined.

DEDICATION ...... iii

ACKONWLEDGEMENT ...... v

TABLE OF CONTENTS ...... vi

LIST OF TABLES ...... x

LIST OF FIGURES ...... xi

LIST OF ABBREVIATIONS/ ACRONYMS ...... xii

ABSTRACT ...... xiii

CHAPTER 1: INTRODUCTION ...... 1

1.1 Background ...... 1

1.2 Problem Statement ...... 2

1.3 Objectives ...... 3

1.4 Scope of the Study...... 3

1.5 Significance of the Study ...... 4

CHAPTER 2: LITERATURE REVIEW ...... 6

2.1 Introduction ...... 6

2.2 Review of Existing Systems ...... 6

2.2.1 MATLAB ...... 8

vi

2.2.2 MathWorks ...... 8

2.2.3 PHPSimplex...... 10

2.2.4 Frontline Solver ...... 10

Simulation/Risk Analysis Tutorial ...... 11

Data Mining Tutorial ...... 11

2.2.5 Wolfram Alpha ...... 12

2.2.6 Comnuan ...... 13

CHAPTER 3: METHODOLOGY ...... 18

3.1 Introduction ...... 18

3.2 System analysis and design ...... 18

3.2.1 Requirements Gathering ...... 18

3.2.2 Formulation of the LP Model ...... 19

3.2.3 System Implementation ...... 20

External Java tools, dependencies and Libraries ...... 21

Eclipse-Jetty-Plugin ...... 22

Apache Maven ...... 22

WindowBuilder /JavaFX ...... 22

Native Development Kits (NDKs) ...... 23

Java Development Kits (JDKs) ...... 24

3.2.4 System Testing and Validation...... 24

vii

CHAPTER 4: SYSTEM ANALYSIS, DESIGN AND IMPLEMENTATION...... 25

4.1 System analysis ...... 25

4.1.1 User Requirements ...... 25

4.1.2 Functional Requirements ...... 25

4.1.3 Non Functional requirements ...... 26

4.1.4 System Requirements ...... 26

4.2 System design ...... 27

4.2.1 Use case Diagram ...... 27

4.2.3 Activity diagram ...... 28

4.2.4 Data Flow Diagram ...... 29

4.3 Design Constraints ...... 32

4.4 System Implementation ...... 33

4.5 Results of data collection and analysis ...... 36

4.6 Application Interfaces ...... 36

4.7 Screenshots of the project ...... 37

4.7.1 The IDE (Eclipse Oxygen) ...... 37

4.7.2 The homepage user interface ...... 38

4.7.3 The type of birds’ panel ...... 39

4.7.4 The data entry panel ...... 40

4.7.5 The minimize panel ...... 41

viii

4.7.6 The maximize panel...... 42

4.7.7 The required resource panel ...... 43

4.7.8 The layers panel from the required resource panel ...... 44

CHAPTER 5: SUMMARY, CONCLUSION AND RECOMMENDATIONS ...... 45

5.1. Summary ...... 45

5.2. Challenges ...... 45

5.3. Recommendations and future work...... 46

BIBLIOGRAPHY ...... 47

APPENDICIES ...... 50

ix

LIST OF TABLES

Table 2.1: Comparison of the existing system and the system to be implemented...... 17

Table 4.1: Minimum hardware and software requirements for the system...... 27

Table 4.8: table displaying the constraints of the linear program...... 34

x

LIST OF FIGURES

Figure 2.1: A sample interface for an optimization tool...... 21

Figure 4.3: Activity diagram showing flow of activities of the system...... 35

Figure 4.4: A Context Diagram...... 36

Figure 4.5: A level 0 data flow diagram ...... 37

Figure 4.6: A level 1 data flow diagram ...... 38

Figure 4.7: How the system interacts with the environment...... 39

Figure 4.9: Screenshot of the IDE (Eclipse oxygen) ...... 42

Figure 4.10: Screenshot of the homepage ...... 43

Figure 4.11: Screenshot of the type of birds’ panel...... 44

Figure 4.12: Screenshot of the data entry panel ...... 45

Figure 4.13: Screenshot of the interface the user uses for minimization ...... 46

Figure 4.14: Screenshot of the interface the user uses to maximize profits ...... 47

Figure 4.15: Screenshot of required resource panel ...... 48

Figure 4.16: Screenshot of the layers panel ...... 49

xi

LIST OF ABBREVIATIONS/ ACRONYMS

API Application Programming Interface

JDK Java Development Kit

JRE Java Runtime Edition lib Library

LP

MILP Mixed-Integer Linear Programming

NDK Native Development Kit

NLP Mixed Linear Programming or-tools Google Optimization Tools

QP

SDK Software Development Kit

WB WindowBuilder

xii

ABSTRACT

The main aim of this study was to develop a Poultry Farm Resource Optimization system that enables poultry farmers maximize profits as well as minimize costs on the farm, the resources optimized include water, feeds as well as medicine.

During the study, research from certain poultry breeders was done so as to determine the resources required for the farmers to invest in a poultry business. A context diagram and Entity

Relationship Diagram were used to show the overview of the system, its boundaries, external entities and major information flows between the entities. The Simplex method was used to formulate and solve the Linear Programming Problem and Java was used to create the backend algorithm of Linear Programming Problem which is run to acquire the optimal solution

(Maximization or Minimization) , an interface was developed using Eclipse Window Builder which helps capture input from the keyboard to fill in the coefficients in the constraints and the objective function of the LP problem in the backend algorithm, the interface also displays the result of the operation i.e. the maximum profit ,number of poultry as well as the minimum cost.

Google OR-Tools were used as a data structure to enable the use of Linear Programming methods (setConstrainst, setCoefficients, MPVariables, GLOP MPSolver) in Java to create the

LP backend algorithm.

System testing was done in two ways; that is component testing where the different parts of the system were individually tested independently and System testing where the entire system is tested as a whole and all shortcomings were noted and dealt with, the prototype was presented to few students to realize more errors and confirm usability.

This report also provides the achievements and limitations faced during the course of this project, alongside recommended future works and conclusion.

xiii •

CHAPTER 1: INTRODUCTION

Poultry has proven to be a major source of income in many households in the country.

Management and decision-making process is a key process in the business for example heavily efficient ways in maximizing profits, reducing costs and many other business-related decisions.

This is cheap when the business is still small but as the business broadens it becomes a very difficult process due to the complexity of the farm and the uncertainty attached. This introduces the need for a way to help in coming up with logical and reasonable decisions, the introduction of it in agriculture paves a way whereby coming up with an optimizing system will not only be a milestone in the business but also of much importance to the owners.

1.1 Background

Poultry farming is one the activities that are carried out by farmers for income generation. To get efficient profits, the farmer needs a lot of information. The Information needed includes; the different ways of feeding the poultry, which birds to rear, which poultry farming method is more favorable for the available conditions as well as medication to allow the birds withstand various poultry diseases.

In the beginning, poultry farming in Uganda was done on a small scale since the activity was carried out at a subsistence level where people reared the birds for only home consumption. With the increasing level of commercializing the activity, farmers are now rearing birds on a large scale for a source of income, food (eggs and meat) and manure to be used in the gardens. Poultry business has contributed to growth of other sectors like Agro-based industries, crop farming and status of the farmers.

i

Automation plays an increasingly important role in contemporary agriculture, particularly in relation to sustainable agriculture in Uganda since they have been used to relying more on the information acquired from those who have been in the system to help in decision making and managing of the other poultry farms. This has been useful to a certain extent though it is not optimal enough and can lead to the risk of making losses.

The introduction of optimizing techniques in the business sector was at first adopted and later seen as not necessary but currently the use of linear programming in the agriculture world has seen a fundamental change in the agriculture sector. Different LP models to solve such problems around the world have been formulated and solved.

As per now no tool has been modeled in the country to help poultry farmers over go their problem of business related decisions and optimizing their resources. The few LP models that have been modeled look at optimization in specific fields in poultry farming i.e. optimizing feed rations and ingredients e.g. Feed Supervisor Software. Using the knowledge acquired in linear programming (Benecke & Winterboer, 1973) and research I managed to do in the poultry farming sector, my proposed optimization tool that is to be modeled will look at the optimization of ratios and costs of poultry farm resources as a whole. These resources include water, labor, medicine/vaccines, and feeds among others since all these resources contribute to the costs the farmer has to incur on the farm to maximize the profits.

1.2 Problem Statement

Optimization of poultry farm resources i.e. feeds, water and medicine, has been challenging for poultry farmers over time. This comes about due to lack of information and knowledge by the farmers on how to best make decisions. Different factors for example multiple resources, the size complexity of the farm make it hard to know which resource to minimize, maximize or how far

2

to optimize production leading to acquisition of fewer profits irrespective of the inputs/ resources used to gain these profits. The project is therefore addressing the problem of inefficiency in optimization of resources in a poultry farm business.

1.3 Objectives

1.3.1 Main Objectives

To develop an optimizing tool which can be used by poultry farmers in situations when they what to optimize their farm resources.

1.3.2 Specific Objectives

1. Gathering the suitable requirements.

2. To come up with an LP model.

3. Implementation of the LP model.

4. Testing the LP model.

1.4 Scope of the Study

The project study has been carried out at various poultry farms located in Uganda. The project has been restricted to identifying how poultry farmers will minimize farm resources (feed ingredients) in order to maximize profits. Feed ingredients include: - maize, soybean, wheat bran, bone meal, table salt among others.

This project is restricted to poultry farming. Using my linear programming model, the farmer is being able to optimize nutrient diet required of every bird species since different bird species have different feeds and rations, there is provision for the farmer to enter the cost of each feed ingredient per kilogram (kg) and the units of rations of the feeds he is willing to use so that calculations are automatically made for him. A graph can be formulated so that the farmer is able

3

to see whether the decision he has made will make him profits or losses basing on the feed rations he is willing to put.

Resources (feed ingredients) are to be used as decision variables; the constraints are mainly the cost and ration of each ingredient. A Sensitivity Analysis was also done so as to cater for the changes in the LP model after it was implemented. The model was therefore used to develop the algorithms to optimize the business profits and minimize the costs.

The system is a desktop based application running on windows OS thus I used the desktop application development resources in order to implement my LP problem algorithm.

1.5 Significance of the Study

To the poultry farmers;

1. The system will help to ensure simultaneous resource-allocation decisions, not sequential

decisions. These are to be made by the users themselves (poultry farmers) basing on their

resources with an effort to minimize losses that will improve their standards of living.

2. This research will also help other poultry farmers who frequently find it hard to make

decisions to embrace the use of optimizing tools in order to optimize their resources,

maximize their profits given the constraints that they have in their businesses.

To the society;

1. The system is going to show the applicability of linear programming in real life practice.

Such study in the past years has been carried about in the agricultural sector by

researchers like Butterworth (Butterworth, 1985), the research to be carried out is still

important due to the rapid development of technology in the agricultural sector therefore

the Implications of the current findings of this study prove the project urgency, justifying

its worth.

4

2. This Poultry Farm Resource Optimization System will help us analyze and put in practice

the basic requirements and methods to be used in the system development cycle basing

on the recently developed applications.

3. Since I will be collecting the information from the farmers in the society regarding

specific views on the on the proposed system so as to develop an application based on

their knowledge. The information gathered will be used by other researchers in the same

area for further studies.

4. This project will as well help us analyze and put in practice the basic requirements and

methods to be used in the system development cycle basing on the recently developed

applications.

5

CHAPTER 2: LITERATURE REVIEW

2.1 Introduction

Linear Programming was developed as a Mathematical pattern during World War II to plan expenditures and returns in order to reduce costs to the army and increase losses to the enemy as

Dantzig (Dantzig, 1947) was commonly credited with being the father of linear programming techniques when he was involved in military strategic challenges in the US Air force during the

World War II and developed and formulated the Simplex method as a basic solution of the

Linear programming model in 1947.

Since then optimizing has been a tested and proven skill in the growth of various business different LP based software has been formulated in industries (Dutta, Gupta, & Fourer, 2011) agriculture, transportation, and other sectors and these have helped to solve the required situation for example

2.2 Review of Existing Systems

Various optimizing software in the past years has been developed, there is more to linear programming than optimal solution that is to say: -

Algorithmic codes which are devoted to finding optimal solution to specific linear programs input is in form of a compact list of LP constraint coefficients and output in the same format for example

CPLEX:

The CPLEX Optimizer was originally developed by Robert E. Bixby and sold commercially from 1988 by CPLEX Optimization Inc. It was named for the simplex method as implemented in

6

the C programming language, although today it also supports other types of mathematical optimization and offers interfaces other than C, this optimizer solves integer programming, very large linear programming problems, using either primal or dual variants it provides interfaces to

C++, C# and java using concert. It is available in independent modeling systems such as

AIMMS, AMPL, and GAMS (CPLEX, 2017). This was originally developed by Robert E. Bixby and sold commercially from 1988 by CPLEX optimization Inc. later acquired by log in 1997 and subsequently acquired by IBM in 2009 (IBM completes Acquisition of ILOG, 2009) and others include CWHIZ, LP-optimizer.

Modeling systems designed to help people formulate LPs and analyze their solutions input of a description of a linear program in a form that people fund reasonably natural and coefficient output also in the same format for example

AIMMS (Advanced Interactive Multidimensional Modeling System) formal paragon decision technology B.V (We are moving forward from now call us AIMMS, 2013) a software package designed for modeling and solving large scale optimization and scheduling type (Joseph, 2004) it has algebraic modeling language with support of different algorithmic codes through its AIMMS open solver interface such as CPLEX , Conopt and an Integrated Development

Environment (IDE) (AIMMS, 2017). It provides exchange of data with external data sources such as spreadsheets, constructs hybrid algorithms for problems with no direct efficient solver

AIMMS support various optimization problem types such as linear, quadratic, global and so many others other modeling systems include AMPL, ANALYZE.

An excel computer based fertilizer optimization tool has also been in existence to help in investing money in the right fertilizers (G, Oduor & Macharia, Martin & Rware, Harrison &

Kaizzi, Kayuki. ,2016) currently farmers have been manually tried to fix and solve the problem

7

of other resources optimization by reviewing the previous data or consulting people already in the system

Survey has been done by Robert Fourer (Fourer, 2011) and in his eleventh series on how people choose the optimizing software, users choose if they are interested in a stand-alone code, or code that can be used as a callable library, different platforms it runs on, choice of algorithm (method simplex or interior point).

2.2.1 MATLAB

MATLAB is an optimizing tool that was rewritten in C by Jack Little, an engineer who was exposed to it during a visit Moler made to Stanford University in 1983. Recognizing its commercial potential, he joined with Moler and Steve Bangert. MATLAB deals with Math,

Graphics and Programming.

Whether you’re analyzing data, developing algorithms, or creating models, MATLAB is designed for the way you think and the work you do. MATLAB combines a desktop environment tuned for iterative analysis and design processes with a programming language that expresses matrix and array mathematics directly. Its toolboxes are professionally developed, rigorously tested, and fully documented.

MATLAB apps let you see how different algorithms work with your data. Iterate until you have got the results you want, and then automatically generate a MATLAB program to reproduce or automate your work (Smith, 2006).

2.2.2 MathWorks

MathWorks was founded by Jack Little, Moler and Steve Bangert. They rewrote MATLAB in C and founded MathWorks in 1984 to continue its development. These rewritten libraries were known as JACKPAC.

8

MathWorks was developed to solve linear, quadratic, integer, and nonlinear optimization problems

Mathworks Optimization Toolbox provides functions for finding parameters that minimize or maximize objectives while satisfying constraints. The toolbox includes solvers for linear programming (LP), mixed-integer linear programming (MILP), quadratic programming (QP), (NLP), constrained linear least squares, nonlinear least squares, and nonlinear equations. You can define your optimization problem with functions and matrices or by specifying variable expressions that reflect the under-lying mathematics ("Mathworks

Company Overview", 2015).

You can use the toolbox solvers to find optimal solutions to continuous and discrete problems, perform tradeoff analyses, and incorporate optimization methods into algorithms and applications. The toolbox lets you perform design optimization tasks, including parameter estimation, component selection, and parameter tuning. It can be used to find optimal solutions in applications such as portfolio optimization, resource allocation, and production planning and scheduling (Schrader &; Spong, 2004).

Capabilities

1. Defining and Solving Optimization Problems: Find a set of design parameters or

decisions that give the best possible result.

2. Nonlinear Optimization: Solve nonlinear programming problems.

3. Linear and Quadratic Programming: Solve large-scale linear and quadratic optimization

problems.

4. Mixed-Integer Linear Programming: Solve mixed-integer linear optimization problems.

5. Multi-objective Optimization: Solve optimization problems with multiple objectives.

9

6. Nonlinear Least Squares, Data Fitting, and Nonlinear Equations: Solve linear and

nonlinear least-squares problems, data fitting problems, and nonlinear equations.

7. Parallel Computing: Accelerate optimization solvers with parallel computing (Blanton &

Kimberly, 1997).

2.2.3 PHPSimplex

PHPSimplex is an online tool for solving linear programming problems that was developed by

George Bernard Dantzig. PHPSimplex is able to solve problems using the Simplex method,

Two-Phase method, and Graphical method, and has no limitations on the number of decision variables or on constraints in the problems. This tool is designed to help students in their learning as it not only shows the final results but also the intermediate operations. It also offers direct solution for professional use. Other advantages are that it does not require any language to state the problem, offers a friendly interface, it is closer to the user, easy and intuitive, it is not necessary to install anything to use, and is available in several languages (Dantzig, 1947),

(Adlakha&Kowalski, 1999).

2.2.4 Frontline Solver

Frontline Solver or optimizers software tools that help users determine the best way to allocate scarce resources. For example, allocating money to investments, or locating new warehouse facilities, or scheduling hospital operating rooms. In each case, multiple decisions need to be made in the best possible way while simultaneously satisfying a number of requirements (or constraints). The "best" or optimal solution might mean maximizing profits, minimizing costs, or achieving the best possible quality (Schrader& Spong, 2004).

Here are some representative examples of optimization problems:

1. Finance/Investment: Cash management, capital budgeting, portfolio optimization.

10

2. Manufacturing: Job shop scheduling, blending, cutting stock problems.

3. Distribution and Networks: Routing, truck loading, fleet scheduling.

Simulation/Risk Analysis Tutorial

Quantitative risk analysis is the practice of creating a mathematical model of a project or process that explicitly includes uncertain parameters that we cannot control, and also decision variables that we can control. Monte Carlo simulation explores thousands of possible scenarios, and calculates the impact of the uncertain parameters and the decisions we make on outcomes that we care about {such as profit and loss, investment returns, environmental results and more.

Industries where simulation and risk analysis are heavily used include:

1. Pharmaceuticals: Modeling R&D and clinical trials

2. Oil & Gas: Modeling drilling projects

3. Insurance: Modeling frequency and types of claims

Data Mining Tutorial

Data mining software tools help users find patterns and hidden relationships in data that can be used to predict behavior and make better business decisions. A machine learning algorithm

"trained" on past observations can be used to predict the likelihood of future outcomes such as customer "churn'" or classify new transactions into categories such as “legitimate" or

"suspicious". Other methods can be used uncover "clusters" of similar observations, or find associations among different items. Common applications include:

Financial Services: Fraud detection, good vs. bad credit risks

Direct Marketing: Segmentation to improve response rates

Electoral Politics: Identifying "most persuadable" voters

11

2.2.5 Wolfram Alpha

Wolfram Alpha is a computational knowledge engine or answer engine developed by Wolfram

Alpha LLC, a subsidiary of Wolfram Research. It is an online service that answers factual queries directly by computing the answer from externally sourced "curate data”, rather than providing a list of documents or web pages that might contain the answer as a search engine might.

Wolfram Alpha was released on May 18, 2009 and is based on Wolfram's earlier flagship product , a computational platform or toolkit that encompasses computer algebra, symbolic and numerical computation, visualization, and statistics capabilities (About

Wolfram Alpha, 2015)

This optimization tool has an interface where the user is required to fill in the necessary information as in the following example:

Step 1: Identify the unknowns in the given LPP. Denote then by x and y then formulate the objective function in terms of x and y. Be sure whether it is to be maximized or minimized.

Translate all the constraints in the form of linear equations.

Step 2: Solve these equations simultaneously. Mark the common area by shaded region which will be the feasible region and now find the coordinates of all the vertices of the feasible region.

Step 3: Find the value of the objective function at each vertex of the feasible region also finds the values of x and y for which the objective function z = ax + by has maximum or minimum value

(as the case may be). (Stephen Wolfram, 2011), (About Wolfram Alpha, 2015)

12

Figure 2.1: A sample interface for an optimization tool.

2.2.6 Comnuan

Comnuan is a website of online Linear Programming calculator and web-based application i.e. the applications are run on web browsers. Users are just required to enter data and check the results.

Given a linear programming problem in the form

Maximize f(x) = cx{ }

Minimize subject to Ax = b{ }

And x_0 where x = fx1, x2, xng is the vector of n variables, c and b are vectors of n real coefficients and m (right-hand-side) numbers, respectively, A is a matrix of mn real numbers, this calculator find x that maximize or minimize the objective function f(x).

13

(Gareth A. Jones & Josephine M. Jones, 2005)

Input Data

This calculator requires from users two inputs. The first consists of two lines: "max" or "min" in the first line and the coefficient c in the second line. For example, you want to maximize f(x) = x1 + 2x2 + 3x3, the first input is as below: max

1 2 3

The second input is for the linear constraints. It is entered as an m(n+2) matrix, where 10 m is the number of constraints, n the number of variables. The first n columns represent matrix A.

The next column represents equality sign or inequality sign in the form of numbers as follows: 1 for ≤0 for =, and 1 for ≥. The last column represents the right-hand-side vector b. For example, the constraints below x1+x2x3=1

-2x1 + x2 + 2x3≥- 5 x1x2≤4 x2 + x3≤5 is entered in the second input as

1 1 -1 0 1

-2 1 2 1 -5

1 -1 0 -1 4

0 1 1 -1 5

14

Note that 0's are entered into the third/fourth rows as they do not depend on x3 and x1, respectively (Tom M. Apostol, 1976). m is the number of constraints, n the number of variables.

The first n columns represent matrix A. The next column represents equality sign or inequality sign in the form of numbers as follows: 1 for≤ 0 for =, and 1 for ≥. The last column represents the right-hand-side vector b. For example, the constraints below

x1+x2x3=1

-2x1 + x2 + 2x3≥- 5 x1x2≤4 x2 + x3≤5 is entered in the second input as

1 1 -1 0 1

-2 1 2 1 -5

1 -1 0 -1 4

0 1 1 -1 5

Note that 0's are entered into the third/fourth rows as they do not depend on x3 and x1, respectively (Tom M. Apostol, 1976).

15

2.3 Comparison of the Existing System and the System to be implemented.

System Name Disadvantage Advantage of my system

Mathworks Optimization Cannot be accessed for free of My optimization tool is

Toolbox charge hence most farmers developed for an open source

find it hard to use it platform and is free. This will

enable various people to

access it. wolframAlpha, AtoZmath, Require enough clear My optimization tool is tutorvista linear programming knowledge in linear equipped with brief tutorial at calculators programming. each stage to guide the user on

how to use the application to

perform various tasks

Phpsimplex Has a hard and complex My optimization tool has a

interface hence it’s very hard simple interface which is very

for the farmers to use this tool. simple to learn as well as easy

to remember how to use.

Frontline systems excel Need one to be well My optimization tool doesn’t

Solver conversant with excel program need any excel program

which is not the case for many knowledge since the LP

farmers hence find it hard to algorithm is not the part of the

use such a tool system that the use interacts

with but rather a back end of

the system interface.

16

mathstool simplex method Require internet connection My optimization tool doesn’t calculator, comnuan linear to be accessed which makes it require internet connection programming calculator hard for these farmers who since its to be designed with

mostly thrive in remote areas efficient LP algorithms which

with poor connection to use. is going to handle the resource

optimization

Google optimization tools have many things in it My optimization tool has

which makes the suite specific features that ensure

complex and confusing to be that it is only used by poultry

used by farmers as an farmers for resource

optimizing tool optimization.

Table 2.1: Comparison of the existing system and the system to be implemented.

17

CHAPTER 3: METHODOLOGY

3.1 Introduction

This chapter gives a detailed description of the steps that were taken in accomplishing my research project. Only relevant actions and information that directly contributes to the results presented should be given as stated by (Busha C.B, 1980). It involves the design and development of the system architecture. The developing mechanisms that are used to guarantee the effectiveness of the system are well explained using my specific objectives. The research project was implemented through the following steps:

1. Requirements gathering.

2. Formulation of the LP model.

3. System Implementation.

4. System Testing and validation.

In order to come up with an optimizing algorithm for the farmers, I included a group of farmers who will helped me come up with the objective function, set up the decision variables and I used the resources as constraints which enabled me formulate an LP problem which later helped me to come up with an LP model. A Sensitivity Analysis will be done so as to cater for the changes in the LP model after it is implemented. The steps given above are further explained below;

3.2 System analysis and design

3.2.1 Requirements Gathering

Before I set up the poultry optimization system using the software development tools, I had to first gather information about what is considered by the farmers before investing in a poultry

18

business. This was done through obtaining of secondary data from the documents released by

UGACHICK poultry breeders Ltd (www.ugachick.co).

3.2.2 Formulation of the LP Model

Linear programming was developed at the beginning of the mathematical programming era, and is still the most widely used type of constrained optimization model. This is due to the existence of extensive theory, the availability of efficient solution methods, and the applicability of linear programming to many practical problems (Beasley, 2011)

I am going to identify the basic variables (parameters under control) and non-basic variables on the sampled farms which are going to help us to identify the constraints (the limitations that restrict the choice of decision variable) this will then help us identify the

Objective function (criterion I want to optimize) of the various poultry farms. I shall then acquire the feasible solution from which I am going to identify the optimal solution for my LP model using the Simplex method. I am also required to make research about the geometry of LPs which will help me to use the Simplex method to solve the LP model.

Basic building blocks of linear programming models are linear equations and linear inequalities in one or more unknowns. These used in linear programming models to describe a great number of practical applications. An example of a linear equation is:

2x + 3y = 8

By changing the = sign to a "≥" or "≤", this equation becomes a linear inequality, for instance:

2x + 3y≥8

The signs "_" and "_", denoting strict inequalities, are not used in linear programming

19

models. The linearity of these equations and inequalities is characterized by the restriction of employing only + and operations on the terms (where a term is defined as a coefficient times a variable) and no power terms.

The unknowns are referred to as variables. In the example above the variables are x and y. A solution of a linear programming model consists of a set of values for the variables, consistent with the linear inequalities and/or equations. Possible solutions for the linear equation above are, among others:

(x; y) = (1; 2) and (4; 0)

Formally, I use the term linear programming (LP) to refer to an optimization problem in which the objective function is linear and each constraint is a linear inequality or equality (Mokhtar &

John, 2009).

Each optimization problem consists of three elements:

 Decision variables: describe the choices that are under your control;

 Objective function: describes a criterion that I wish to minimize (e.g., cost) or maximize

(e.g., profit);

 Constraints: describe the limitations that restrict my choices for decision variables

3.2.3 System Implementation

Since the system is running on desktop platforms i.e. Windows, MacOS, Linux I used the desktop application development resources i.e. WindowBuilder, JavaFX in collaboration with a compiler i.e. Eclipse / NetBeans to develop the application interface using the Java programming language with the help of different Java Development Kits (JDKs) , External reference tools, libraries as well as plugins and the Native Development Kits(NDKs) which enabled us to use C

20

and C++ programming languages in the Java compiler files in order to improve our LP problem algorithm.

External Java tools, dependencies and Libraries

The addition of external tools, dependencies as well as libraries to ensure the proper working of the system during implementation is very essential. Some the external tools added included; a) or-tools VisualStudio2017-64bit v6.4.4495 b) eclipse-jetty-plugin-master c) Apache Maven d) Git e) WindowBuilder /JavaFX or-tools VisualStudio2017-64bit v6.4.4495

Google Optimization Tools (OR-Tools) is a fast and portable software suite for solving combinatorial optimization problems. The suite contains:

 A constraint programming solver.

 A simple and unified interface to several linear programming and mixed integer

programming solvers.

 Graph algorithms (shortest paths, min cost ow, max ow, linear sum assignment).

Google created OR-Tools in C++, but you can also use it with Python, C#, or Java.

In this example, I use the linear solver wrapper to invoke Glop (Google's linear optimizer) since I imported a Google external library in my project.

The following code creates the solver. privatestaticMPSolver createSolver ( String solverType ){

returnnewMPSolver(”LinearExample” ,

21

MPSolver . OptimizationProblemType . valueOf ( solverType )); }

When the program calls the solver by: runLinearExample(”GLOP LINEAR PROGRAMMING” ); the argument

GLOP\ LINEAR\ PROGRAMMING

,which tells the solver to use Glop, is passed to the solver through the

OptimizationProblemType method.

Eclipse-Jetty-Plugin

Eclipse Jetty Plugin is used to provide a stable and consistent launch environment for large projects and development teams (reducing configuration needs per developer to a minimum).

Eclipse Jetty Integration provides a launch configuration for launching Jetty server out of the

Eclipse IDE

Apache Maven

Maven is a build automation tool used primarily for Java projects. Maven describes how software is built, its dependencies on other external modules and components, the build order, directories, and required plug-ins. Unlike earlier tools like Apache Ant, Apache Maven uses conventions for the build procedure, and only exceptions need to be written down.

It comes with pre-defined targets for performing certain well-defined tasks such as compilation of code and its packaging.

WindowBuilder /JavaFX

WindowBuilder is a powerful bi-directional Java GUI designer.

22

WindowBuilder is composed of SWT Designer and makes it very easy to create Java GUI applications without spending a lot of time writing code. It uses the WYSIWYG visual designer and layout tools to create simple forms to complex windows; the Java code will be generated for you.

WindowBuilder is built as a plug in to Eclipse and the various Eclipse based IDEs (RAD, RSA,

MyEclipse, JBuilder etc.). The plugin builds an abstract syntax tree to navigate the source code and uses GEF to display and manage the visual presentation.

External Reference Contents

 VrApi for third-party engine integration

 Native application framework for building high-performance VR Applications from

scratch.

 Additional libraries providing support for GUI, locale, and other functionality.

 Native project sample applications and source to provide reference model for creating

your own VRapplications.

 Tools and resources to assist with native development.

Native Development Kits (NDKs)

The Native Development Kit (NDK) is a toolset that allows you to implement parts of your application using native code languages such as C and C++. NDK known to work hand in hand with the Desktop SDK. That is to say that without installing SDKs properly, you can’t use the

NDKs.

The NDK includes a powerful debugging tool called ndk-gdb, a small shell script wrapped around GDB. Using ndk-gdb from the command line adds convenient features to your debugging

23

workflow by allowing, for example, adding breakpoints, stepping through code, and inspecting variables.

Note: You may install the NDK during the Compiler installation process, but I recommend installing it manually to be sure that your command-line environment is set up properly and agrees with your compiler setup.

Java Development Kits (JDKs)

Eclipse or NetBeans as Java compilers and development tools require Java Development Kit

(JDK) in order to run. Java Runtime Edition (JRE) itself is not sufficient. Java JDK needs to be installed prior installing the compiler (Eclipse or NetBeans) development tools.

Multiple JDKs are supported by Java Compiler development tools, such as IBM JDK, Open

JDK, and Oracle JDK

3.2.4 System Testing and Validation.

Testing and validation will be carried out to identify errors, weaknesses and also to verify that the system meets the user’s expectations.

I have provided the required decision variables inform of input data in to the system then observe the outcome. A snapshot of the result is taken for future and further analysis. I am then going to make brief notes to help create a hypothesis from the observation.

In case of any failures, using the hypothesis I am going to define problem attempted to be solved, suggest possible solutions to the problem or system failure and then estimate the impact of the solution. Further testing is done to check if the problem has been solved.

24

CHAPTER 4: SYSTEM ANALYSIS, DESIGN AND IMPLEMENTATION

This section gives an overview of system analysis which covers the user, functional and non- functional requirements. It also explains the system design through the different diagrams so as to give a proper understanding of the desktop application.

4.1 System analysis

The overall objective of this phase is to understand the proposed project, ensure that it will support business requirements and build a solid foundation for system development as well as automation. I therefore explored the requirements of the system that were categorized into functional requirements, non-functional requirements and user requirements based on the results of the analysis of the data that were created.

4.1.1 User Requirements

These are the requirements for the different users of the Poultry farm resource optimization system i.e. poultry farmers.

 Installs and opens the application

 Inputs the available resources in the respective fields.

 Instructs the system to solve the problem.

 Makes use of the optimal solution that has been displayed

 Navigates freely from one activity to another.

 Should possess a device with the specified qualities to enable him/her use the application.

4.1.2 Functional Requirements

These are services, tasks and functions that the system performs, how it should react to particular inputs and the internal workings of the software i.e. the calculations, data manipulation and

25

processing (considering Linear Programming for my case) they include; Allowing the users to input basic variables in form of the resources that the user wants to optimize after being launched.

 The system generates an optimal solution using the LP algorithm.

 The system displays the solution to the user.

4.1.3 Non Functional requirements

These are functions that are not mandatory in the system but enhance its functionality.

They include;

 Reliability: the system should perform to full capacity under all circumstances.

 Integrity: This ensures the contents of an outcome/ results are not altered in transit by

anyone else.

 Usability: the system is user friendly and very easy for novice users to learn.

 Scalability: the system is easy to enhance and add new features and functionality to run

over new platforms.

 Response time: every user action while interacting with the system should produce a

quick response.

4.1.4 System Requirements

Here, I shall consider the minimum hardware and software requirements my system should have in order to operate efficiently. I have summarized these requirements in the table below;

Software and Hardware requirements Specification

Computer(Laptop) Windows desktop application

RAM At least 512MB

26

System storage At least 1GB free

Operating system Windows XP and above

Windows Services Latest version

Table 4.1: Minimum hardware and software requirements for the system.

4.2 System design

Systems design is the process of defining the architecture, components, modules, interfaces, and data for a system to satisfy specified requirements.

This section therefore describes the layout of the system clearly showing the different ways the system is going to interact with the user, how the architectural components work together, process and data modeling and the logical design of the application.

4.2.1 Use case Diagram

A use case diagram helps us specify and explain the interaction between the actors and the system and shows the relationship between the user and the different use cases in which the user is involved as shown below.

27

Figure 4.2: Simple diagram showing the major components of the system through a use case diagram.

4.2.3 Activity diagram

This is basically a flowchart to represent the flow from one activity to another activity. The activity can be described as an operation of the system. The control flow is drawn from one operation to another.

28

Figure 4.3: Activity diagram showing flow of activities of the system.

4.2.4 Data Flow Diagram

A data flow diagram (DFD) shows how data moves through an information system but does not show program logic or processing steps. A set of DFDs provides a logical model that shows what the system does, not how it does it. That distinction is important because focusing on

29

implementation issues at this point would restrict your search for the most effective system design.

Figure 4.4: A Context Diagram.

30

Figure 4.5: A level 0 data flow diagram

31

Figure 4.6: A level 1 data flow diagram

4.3 Design Constraints

The poultry farm resource optimization system is going to have more advancement compared to the existing optimization tools present. This is because besides being specific to dealing with poultry, it is going to have more functionalities that other optimization tools do not basically have which include generation of graphs and the ability to keep past records for future reference.

I am also going to take the assumptions given below;

 I am going to assume that poultry farmers carry out poultry business with an aim of profit

maximization.

32

 Poultry farmers are the major users of the system.

 There is need to know the profits that have been made over time in order for future

reference.

 I shall also assume that farmers need guidance when making logical decisions and those

decisions made on individual basis lead to losses.

 I shall assume that due to the advancement in technology, the greater percentage of

poultry farmers own smart phones and can therefore access the application easily.

4.4 System Implementation

Implementation is the process of moving an idea from concept to reality. The System implementation is a realization of a technical specification or algorithm as a program, software component, or other computer system through programming and deployment.

I was able to bring the resource optimization concept to reality by developing an LP model that I am going to use while developing an algorithm to help us accept input variables and constraints so as to come up with a suitable optimal solution for the farmer. Below is a simple description of how the system will interact with the environment.

Figure 4.7: How the system interacts with the environment.

After the farmer has had an overview of the resources he has, he is able to get an optimal solution on how to utilize them using the application; he gathers necessary information that is

33

going to act as input to my system so as to make decisions. He uses his computer to input the resources. The system is therefore able to solve the LP problem and returns the answer to the farmer. This solution will therefore help the farmer make the right decisions when implemented so as to maximize profits and minimize costs.

A Poultry Farming Example

Problem statement

A poultry farmer is trying to determine a production plan for his poultry farm. There are three types of Birds to be reared (say Layers, Broilers, and Croilers) to be produced on the basis of three farm resources (say Water and Feeds and Medicine). Each of the resources is measured independently

Resources Layers Broilers Croilers Available resources

Water A1 A2 A3 QW

Feeds B1 B2 B3 QX

Medicine C1 C2 C3 QY

Table 4.8: table displaying the constraints of the linear program.

Task: Here I seek the optimal product mix– that is, the number of each bird that is to be produced using a given amount of resources in a given time period in order to maximize profits. Formulate this as an LP.

Step 1: Defining the Decision Variables x1: number of layers x2: number of broilers x3: number of Croilers

Step 2: Choosing an Objective Function my objective is to maximize profit:

34

Profit =U1x1 + U2x2 + U3x3

Z = U1x1 + U2x2 + U3x3

Step 3: Identifying the Constraints The amount of resources available and the maximum sales potential for each bird restrict the quantities to be reared. Since I know the unit price for each bird, the constraints can be written as linear inequalities as follows:

A1, A2, A3, B1, B2, B3, C1, C2, C3 represent the amount of a particular resource that a particular bird consumes in the given time period.

QW, QX, QY represent the available quantity of specific amount of the poultry farm resources

A1x1 + A2x2 + A3x3≤QW

B1x1 + B2x2 + B3x3≤QF

C1x1 + C2x2 + C3x3≤QM

Logic indicates that i should also include non-negativity restrictions on the variables.

Non-negativity constraints: x1≥0, x2≥0, x3≥0.

By combining the objective function and the constraints, i obtain the LP model as follows:

MaxZ = U1x1 + U2x2 + U3x3

s.t A1x1 + A2x2 + A3x3≤QW

B1x1 + B2x2 + B3x3≤QF

C1x1 + C2x2 + C3x3≤QM where x1≥0 x2≥0 x3≥0.

35

4.5 Results of data collection and analysis

I was able to conduct some oral interviews with the managers of some commercial poultry farms who gave us important information that I used to implement a system to simplify the issue of decision making. The information included

1. How many birds do you rear?

2. How many breeds of birds do u rear?

3. How much feeds are required for the different types of birds?

4. What is the ratio of input to output in terms of farm resources and profit and how do u

make the input decisions?

4.6 Application Interfaces

Basing on the answers I got from my interviews, I was able to come up with a user friendly interface that the farmers would freely use to guide them in decision making as it was one of the major issues they faced. The sample screenshots of the interfaces I came up with are shown in the next subsection.

After launching my application on the computer, the farmer will be able to interact with such an interface as shown below. He will therefore be prompted to make a choice depending on the decision he/she wants to make (either minimization or maximization)

36

4.7 Screenshots of the project

4.7.1 The IDE (Eclipse Oxygen)

Figure 4.9: Screenshot of the IDE (Eclipse oxygen)

37

4.7.2 The homepage user interface

After opening the system, the user is then given different options by the system so as to select from them.

Figure 4.10: Screenshot of the homepage

38

4.7.3 The type of birds’ panel

When the user selects the type of birds’ panel, he/she is an option to select the type of birds he/she wants to rear.

Figure 4.11: Screenshot of the type of birds’ panel

39

4.7.4 The data entry panel

After selecting the type of birds, the user is then required to enter the resources the birds consume within a specific period of time. This data is stored in a temporary folder so that the user can use it again during the minimization of costs and maximization of profits stages.

Figure 4.12: Screenshot of the data entry panel

40

4.7.5 The minimize panel

After selecting the type of birds the user is planning to rear, he/she has then to enter the available resources in terms of costs and select the minimize button so as to be given the number of birds he/she has to rear in order to minimize costs.

Figure 4.13: Screenshot of the interface the user uses for minimization

41

4.7.6 The maximize panel

After selecting the type of birds the user is planning to rear, he/she has then to enter the available resources in terms of costs and select the maximize button so as to be given the number of birds he/she has to rear in order to maximize profits.

Figure 4.14: Screenshot of the interface the user uses to maximize profits

42

4.7.7 The required resource panel

Having entered the resources consumed by each type of bird at each age, the user can therefore use the already entered data to determine the amount of resources the birds can consume if the number of birds changes.

Figure 4.15: Screenshot of required resource panel

43

4.7.8 The layers panel from the required resource panel

The user is then required to enter age of the birds and the number of birds he/she is rearing in a desired duration so as to be given the amount of resources required to take the birds for that period.

Figure 4.16: Screenshot of the layers panel

44

CHAPTER 5: SUMMARY, CONCLUSION AND RECOMMENDATIONS

5.1. Summary

The experimental results presented in this project demonstrate that computers/laptops have the capability to execute various complex operations as well as number calculations basing on the available computer specifications and algorithms.

The experimental results presented in this project demonstrate that mobile phones have the capability to execute various complex operations as well as number calculations basing on the available phone APIs and algorithms.

I was therefore able to declare the solver in the linear programming algorithm is a mechanism that ensures that the inputs in the constraints are run as part of the algorithm. Importing the or- tools VisualStudio2017-64bit v6.4.4495 library into my project also enabled me to use the various linear programming methods that can manage to declare the objective function, constraints, input coefficients and the Linear programming solver.

5.2. Challenges

I faced some challenges during the course of my project development as mentioned below;

5.2.1 Application development challenges.

 I faced a problem of setting up the required platform (Eclipse Window Builder / JavaFX)

with the appropriate requirements i.e. External reference tools, plugins and libraries that

were to be used when developing the system. Due to the absence of the require android

linear programming plugins, I opted to the development of a Windows OS desktop

application.

45

 I also faced a challenge of acquisition of external tools/ libraries (or-tools

VisualStudio201764bit v6.4.4495) that were to enable us use Linear Programming in

Java.

5.3. Recommendations and future work

I recommend poultry farmers to add automation in their farms by adapting to use of various technology, for example making use of my project in decision making in order to maximize their profits.

Better optimization techniques and features if added to application in the future such as labor scheduling, optimization based on more than the available resources as well as resource optimization not only for poultry on the farm but also for more animals on the farm that also consume a lot of farm resources if well monitored will make a greater improvement in the agriculture as well as farm management by different farmers in the country.

46

BIBLIOGRAPHY

AIMMS. (2017, September 11). Wikipedia. Retrieved December 17, 2018, from The Free

Encylopedia: nrelax$n@@underlinefnboxfhttps://en.wikepedia.org/wiki/AIMMSggnmathssurrounds@$nrelax

AIMMS, W. a. (2013, October 29). Retrieved December 17, 2018, from https://web.archive.org/web/20131029190618/htpp://business.aimms.com/moving-forward-now- call-us-aimms/

Apostol, T. M. (1976). Introduction to analytical number theory(Undergraduate texts in mathematics).

Butterworth, K. (2017). Practical Application of Linear/integerProgramming in Agriculture.

Journal of the Operational Research Society (36), 99-107.

Chambers, R., & SkinnerC.J. Analysis of survey Data. Wiley.

CPLEX. (2017, October 5). In Wikipedia. Retrieved December 17, 2018, from The Free

Encylopedia: https://en.wikipedia.org/wiki/CPLEX

Dantzig, G. (1947). the(dantzig) simplex method for linear programming.

Dutta, G., Gupta, N., & Fourer, R. (2011). An optimization based decision support system for strategic planning in a process industry: The case of aluminium company in India. Journal of the

Operational Research Society , 616-626.

47

Fourer, R. (2011). Computing-Linear Programming-Eleventh in a series of LP surveys spotlights recent developments and trends.

G, O., Macharia, M., Rware, H., & Kaizzi, k. (2016). Fertilizer use optimization approach: An innovation to increase agricultuarl profitability for African farmers. african Journal of

Agricultural Research (11), 3587-3597.

IBM completes Acquisition of ILOG. (2009, January 6). Retrieved December 17, 2018, from https://www-03.ibm.com/press/us/en/pressrelease/26403.wss. interview. (2017, October 8). Wikipedia. Retrieved December 17, 2018, from The Free

Encylopedia: https://en.wikipediaorg/w/index.php?title=interview&oldid=804413801 interview. (2018, october 8). Wikipedia. Retrieved December 17, 2018, from The Free

Encylopedia: https://en.wikipedia.org/w/index.php?title=Interview&oldid=804413801

Joseph, K. (2004). Modelling Languages in Mathematical Optimization. Kluwer Academic

Publishing ISBN 978-1-4020-7547-6.

M^Oler, C. (2004). The Origins of MATLAB.

Mokhtar, S., & John, J. (Duality and Sensitivity analysis, Linear Programming and Network

Flows(4th Ed)). 2009. Atlanta,Georgia: A John Wiley & Sons, Inc Publication.

Nix, J. (1969). Annotated Bibliography on Farm Planning Techniques. Journal of the Farm management Association , 1 (7), 1-56.

Overview, m. C. (Retrieved on December 17 2018).

48

Scott, A., & Wild, C. (1986). Fitting logistic models under case-control or choice based sampling. Journal of the Royal Statistical society (48), 170-182.

Winterboer, R., & Benecke, R. R. (1973). Linear Programming Apllications to Agriculture. New

York: Oxford University Press.

49

APPENDICIES

Part of my java code

//MAXIMIZATION PROBLEM

import com.google.ortools.linearsolver.MPConstraint;

import com.google.ortools.linearsolver.MPObjective;

import com.google.ortools.linearsolver.MPSolver;

import com.google.ortools.linearsolver.MPVariable;

//this code is well arranged

public class Constraint {

static { System.loadLibrary("jniortools");

}

public static double A1;

public static double A2;

public static double A3;

50

public static double B1;

public static double B2;

public static double B3;

public static double C1;

public static double C3;

public static double C2;

public static double W,F,M,D,w1,f1,m1,c1,c2,c3;

static MPSolver solver = createSolver("GLOP_LINEAR_PROGRAMMING");

//Declare the solver

public static MPSolver createSolver (String solverType) {

return new MPSolver("Constraints",

MPSolver.OptimizationProblemType.valueOf(solverType));

}

public static void runLinearExample(String solverType) {

MPSolver solver = createSolver(solverType);

51

//Create the variables.

double infinity = MPSolver.infinity();

// w , x and y are continuous non-negative variables.

MPVariable w = solver.makeNumVar(0.0, infinity, "w");

MPVariable x = solver.makeNumVar(0.0, infinity, "x");

MPVariable y = solver.makeNumVar(0.0, infinity, "y");

//Define the objective function.

// Maximize 2 * w + 3 * x + 4 * y.

MPObjective objective = solver.objective();

objective.setCoefficient(w, c1);

objective.setCoefficient(x, c2);

objective.setCoefficient(y, c3);

objective.setMinimization();

52

// Define the constraints.

MPConstraint c0 = solver.makeConstraint(w1,infinity); c0.setCoefficient(w, A1); c0.setCoefficient(x, A2); c0.setCoefficient(y, A3);

MPConstraint c1 = solver.makeConstraint(f1, infinity); c1.setCoefficient(w, B1); c1.setCoefficient(x, B2); c1.setCoefficient(y, B3);

MPConstraint c2 = solver.makeConstraint(m1,infinity);

53

c2.setCoefficient(w, C1);

c2.setCoefficient(x, C2);

c2.setCoefficient(y, C3);

solver.solve();

W = w.solutionValue();

F = x.solutionValue();

M = y.solutionValue();

D = solver.objective().value();

}

//the program calls the solver public static void main(String[] args) throws Exception {

runLinearExample("GLOP_LINEAR_PROGRAMMING");

}

54

}

55