In university we have a course where we have a course where you define a "linear program" to find out which product or product-combination is best to product to have maximum revenue.
The basic approach is to define a target equation: z = 4x + 3y x := amount of product 1 y := amount of product 2 which we maximize under some side conditions: 1. 5x + 10y ≤ 100 2. x ≤ 20 The first case could mean that we have 100h of working hours as capacity where it takes 5h to produce product 1 and 10h to produce product 2. The second case could mean that we have to supply the market with a minimum amount of 20 units of product 1. You can put this into a matrix: A = [5 10 1 0 100; 1 0 0 1 20; 4 3 0 0 -1] and apply the "Simplex" algorithm to find the value of x and y where z reaches maximum without breaking side conditions. To cut a long story short to apply the simplex algorithm we need to transform all conditions into a "canonical form" (e.g. convert greater then to less then). If I now would like to write a julia script which does solve linear programs for me I need to "read" the equation and change it. Do I need to write some sort of string based equation parser or is there some package which would do this for me? Best, Bo
