Not long ago to do arithmetic modelling of the operation, to use the lingoAnd still have to re-provision the dynamic plan using lingoSo on Baidu found under how to use C + + deployment of lingo, the final result found to be a pitSo I got stuck in it and got two or three cows to figure out that there was a day in the house that didn't sleep ... To bucketHowever, it is clear, but also took a lot of detours, so to write down a little experience, summed u
We sometimes encounter heavy, repetitive work when using lingo, manual operation is obviously time consuming, and the @for function in lingo can only do some simple loops, which requires us to apply the script file to simplify these repetitive work. The English part below is an example from the Official Handbook, which summarizes the 2 points I find useful:1. script file type:. LTF However, the script file
The first step: Enter the target condition and the constraint condition. Each line is separated by semicolons. Then click the Solve button on the toolbar or the Solve submenu under the Lingo menu.Step Two: Check the results in the report.By default, lingo does not perform sensitivity analysis.Need to be configured in lingo to generate a sensitivity analysis repor
with the customer,
After the seal is signed, fax will be sent back to the customer.
Before sending an instruction to the warehouse and the slitting factory, the type and quantity of required materials were calculated using a fixed formula with a proportional coefficient. for example, if the width of all products required by the customer is
If the value is 99, multiply the order by a proportional coefficient greater than 1, or call it magic number. The universal proportional coefficient, such a
Assign values using verbose syntax
The logical operators in lingo use the single equal sign "= ".
Set Param To Value
Put Value Into Param
Verbose syntax to assign values more clearly.
Case-insensitive
Because case-insensitive is case-insensitive, note the comparison of strings.
Put"A" = ""
-- 1
Case-sensitive
Lingo is not sensitive in most cases. Only one case is that the propert
: x (K, J) = 1 ;);! Ensure that no circles exist. @ for (city (I) | I # gt #1: @ for (city (J) | J # gt #1 # and # I # ne # j: u (I)-u (J) + n * x (I, J)
3. maximum short circuit problem
Given N point Pi to form a set {Pi}, the distance from any point Pi in the set to another point Pj is represented by Cij. if Pi to Pj is not connected by ARC, cij = positive infinity, Cii = 0, specify an endpoint PN, and the shortest route from Pi to PN is required. Here we use dynamic planning.
And
The code solved with lingo is as follows:
Model! With lingo to solve the problem of salary distribution, five people each have a different job;Sets:var/1..5/;Link (var,var): c,x;EndsetsDataC= 3 8 2 10 38 7 2) 9 76 4 2) 7 48 4 2) 3 59 10 6 9 10;Enddatamin= @sum (link:c*x);@for (Var (i):@sum (Var (j): X (I,J)) =1);@for (Var (j):@sum (Var (i): x (I,J)) =1);@for (Link: @bin (x));!x11,x12,.., x15,x21,x22,.., x25
Model: sets: Jing/1 .. 20/; out/1 .. 13/; jingout (Jing, out): DAT; Result (Jing, out): X; themin (Jing, out); endsetsdata: DAT = (20*13 data ); enddata @ for (result (I, j): @ Bin (x (I, j )));! Only 0 and 1 @ for (Jing (I): @ sum (result (I, j): X (I, j) = 1) for all elements );! Each patrol point must be assigned a location; @ for (Out (j): @ sum (result (I, j): X (I, j)> = 1 );! Patrol points> = 1 for all exits; @ for (Out (j): @ sum (result (I, j): X (I, j ))
The code solved with lingo is as follows:
Model! The steady-state probability distribution of the transfer matrix is obtained.Sets:PROD/1..3/:P;Link (prod,prod): T;EndsetsData:! Transfer matrix;t= 0.368 0 0.6320.368 0.368 0.2640.184 0.368 0.448;Enddata@for (Prod (i):! Remove a redundant constraint;P (i) = @sum (link (j,i):P (j) *t (J,i));@sum (prod:p) = 1;@for (Prod (i):@warn (' The sum of each line of the input matrix must be 1 ',@abs (1-@sum (link
Id = getnettext ("http://www.baidu.com /")
-- Getnetbytearray ("http://www.baidu.com ") Put getstreamstatus (ID) Put nettextresult (ID)
-_-
--------------------------------------------------------------------------------
Netlingo
--------------------------------------------------------------------------------
It is used to access the network and obtain the text stream or media stream of the webpage. It can also be used to check whether the Network is available.
--
Easy language overview --- easy language introduction, Overview --- easy language
Easy language Overview 1. Easy language introduction easy language is a self-developed Chinese programming language suitable for national conditions
Import java.util.ArrayList;
Import java.util.List;
Import Java.util.Scanner; /** * Small easy to have a length of n sequence, small easy to remove the inside of the repeating elements, but small easy to think is for each element to retain the last occurrence of that.
Small easy to meet difficulties, I hope you to hel
Reference: Leisure Air has a Boeing 737-400 airplanes, one based in Pittsburgh and the other in Newark. Both airplanes has a coach section with a 132-seat capacity. Each morning the pittsburgh-based plane flies to Orlando with a stopover in
Reference: Market Application 1: Relax-and-enjoy provided Bp&j with a advertising budget of $30,000 for the first month ' s campaign. In addition, Relax-and-enjoy imposed the following restrictions on how bp&j may allocate these funds:at least tele
Reference: InstanceSuppose that companies is the only manufacturers of a particular product; They compete against each other for the market share. In planning a marketing strategy for the coming year, each company would select one of the three
6. optimal selection a drilling team should determine 5 drilling wells from 10 available slots to minimize the total drilling cost. If the 10 bits are codenamed s1, s2 ,..., s10, corresponding drilling costs c1, c2 ,..., c10 is 5, 8, 10, 6, 9, 5, 7,
Why does the button not respond to mouseup?
The tool panel has three modes: Classic/default/flash component. Director default mode. In this mode, the button is actually flash component, and Director Sets flash component by default to not respond
Production plan for processed dairy productsProcessing 1 barrels of milk has two processing methods, (1) Production 12 hours to get 3 kg A1, profit 24 Yuan/kg (2) Production 8 hours to get 4 kg A2,
Profit 16 Yuan/kgEvery day:50 barrels of milk time 4
In daily webpage design, tables are one of the most commonly used html controls. For convenience and beauty, Easy appears. grid, this table is Easy to use, and the symbol is Easy.
Users only need to use html and Javascript, and read the Demo of Easy. Grid, and use it freely. If you are a programmer, read the source cod
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.