# Building a model in a Decision Optimization experiment

To build a Decision Optimization model in an experiment, click Build model in the sidebar.

You can create or import a model in the following ways:

- Modeling Assistant - an assisted mode to formulate models in natural language
- Python (DOcplex code) - a native Python API for Decision Optimization
- OPL (Optimization Programming Language) - a mathematical programming modeling language for Decision Optimization
- LP (CPLEX) - an algebraic format for the CPLEX solver (software used to solve Decision Optimization models)
- CPO (Constraint Programming Optimizer) code - a format for constraint programming models for the CP Optimizer solver
- Import model for existing notebooks or files including .py, .mod, .mps, .lp, and .cpo files

When you open the Build model view for the first time, you must select one of these modes in the Model wizard.

If you start creating a model in one mode, and then want to start again with another mode, click the Replace icon to return to the Model wizard. If you replace your model, the previous one is deleted.

If you select a code method, you can enter your model formulation in the text editor.

This model is taken from the Diet sample. Using the data, the model analyzes the requirements of a healthy diet and the resources available and prescribes the best quantities of different food types.

When you edit your model formulation in the Build model view your content is saved automatically, and the Last saved time is displayed.

When you have finished editing your model, you can solve it by clicking the Run button.

## Learn more

- For a tutorial on formulating models with the Modeling Assistant, see Formulating and running a Decision Optimization model: house construction scheduling.
- For a tutorial on creating Python DOcplex models, see Solving and analyzing a Decision Optimization model: the diet problem.
- For more information about OPL models, see Decision Optimization OPL models.