Azzera filtri
Azzera filtri

MILP Optimization dynamic input

3 visualizzazioni (ultimi 30 giorni)
CK
CK il 10 Lug 2019
Risposto: Dheeraj Singh il 29 Lug 2019
Hi,
I'm planning to implement a tool to optimize a project portfolio. My problem is that the optimization is dependent from a users input, as these inflence the contrains. For example, an user can enter a required amout of resources in order to complete a project. It is than tested whether there are enough resources to complete this project and this input is than used for the optimization. I was thinking to use the App Designer in order to create a GUI with tables to enter all required inputs. However, I thinks it's hard to get the data enterd into a table. Has anyone an idea on how to implement this tool?
Cheers

Risposte (1)

Dheeraj Singh
Dheeraj Singh il 29 Lug 2019
I understand that you want to enter user input through a table.
You can do that by making the table fields editable.
So, depending upon the input, suppose you want the user input in the form of mXn matrix
You can initially fill the table with NaN(not a number) values along with a button in the following manner:
function startupFcn(app)
%no of rows 10
%no of columns 4
a1=nan(10,4);
a2=num2cell(a1);
app.UITable2.Data = a2;
end
It will look something like this:
ML.PNG
After that you can use call back for the button the to take all your input using table.

Categorie

Scopri di più su Portfolio Optimization and Asset Allocation in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by