Importing optimization solutions from external sources

You can use an external analytics software to solve your optimization problem outside the interface of PlanWise, for example AIMMS, AMPL, Python or R. It is then possible to import that solution to PlanWise, for example to use the report tool to build charts.

The solution must be in two-dimensional table format in a CSV-file like this:

TreatmentUnitGUID

Alternative

Proportion

FDB9447D-F915-4396-A74E-E4F9A03B27C2

1

1

03FBE495-03AA-4885-8318-D9709664DE0A

1

0.8

03FBE495-03AA-4885-8318-D9709664DE0A

2

0.2

85F4404A-E21B-4901-B817-187D0EF971B1

1

1

448B6A5C-9A95-4610-9765-415DC609D64B

5

1

62AF5BD5-272E-414B-913C-B7D64403FCE4

3

1

92F741E8-306F-461C-8CA5-6022A3BB890E

1

1

Where the first column’s heading and values are the treatment unit guids (set i).

The second column "Alternative" contains the number of each alternative selected in the optimization (treatment programmes, set j).

The third column "Proportion" of the table contains the proportion of treatment unit i treated with alternative j.

Note that the sum of all proportions j for one TreatmentUnitGUID i should be 1 (this is not controlled in the software!) and that only alternatives and treatment units that are part of the solution needs to be put in the table.

For example, for treatment unit with the guid 03FBE495-03AA-4885-8318-D9709664DE0A in the example csv, the sum is 0.8+0.2 =1.

The actual import is simple:

1.Go to TPG-results.
2.Right click on the simulation you have used as basis for the optimization.
3.Choose Import.
4.Chose the csv-file you have prepared and write a name for your optimization.
5.Click OK.

 

You will now find the solution under Optimization results and can use it as any other solution. It will also be added to the SQL server database.

Contact support. © Sveriges Lantbruksuniversitet